neugi Posted May 5, 2006 Share Posted May 5, 2006 Hi, i got a sql query that takes about 350 sec. my problem ist that after 60 sec my php script is sending again the same sql query again. also my PHP skript ist getting a Read Timeout. i used this function to extend the time, but it seems they dont work@set_time_limit(400); if (function_exists('apache_reset_timeout')) apache_reset_timeout();how can i stop this? or what is the best way to execute sql queries that take longer?best Quote Link to comment https://forums.phpfreaks.com/topic/9128-long-sql-queries/ Share on other sites More sharing options...
ober Posted May 5, 2006 Share Posted May 5, 2006 May I ask what is taking so long? What are you possibly doing that would take 6 minutes to process on the database?And are you starting the sending of the script every 60 seconds? You really need to change the execution time in the php.ini file. Quote Link to comment https://forums.phpfreaks.com/topic/9128-long-sql-queries/#findComment-33571 Share on other sites More sharing options...
neugi Posted May 8, 2006 Author Share Posted May 8, 2006 Hi,here is the query[code]INSERT INTO kompa(kompa.prod_id, kompa.model, kompa.typ_id, kompa.model_id, kompa.kompa_flag, kompa.engine_id, kompa.prod)SELECT MODELS.PROD_ID, MODELS.NAME, MODELS.TYP_ID, MODELSKOMPA.MODEL_ID, MODELSKOMPA.KOMPA_FLAG, MODELS.ENGINE_ID, PRODUCER.NAMEFROM MODELSKOMPA, MODELS, PRODUCERWHERE MODELS.MODEL_ID = MODELSKOMPA.MODEL_ID AND MODELS.PROD_ID = PRODUCER.PROD_IDORDER BY MODELSKOMPA.MODEL_ID[/code]MODELSKOMPA -> about 17.000 entries MODELS -> about 17.00 entries PRODUCER -> 600 entries OUTPUT is simple all the data is put into a new database form which i will work onbest Quote Link to comment https://forums.phpfreaks.com/topic/9128-long-sql-queries/#findComment-34234 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.