HowdeeDoodee Posted July 11, 2007 Share Posted July 11, 2007 i have access to a slow queries folder from my host provider. I check this folder frequenctly. I ran the slow queries in phpMyAdmin and I am getting wildly different results, even when I run the same query multiple times. What in the world is going on here, that I run the same query and get results from 14 seconds to .0002 seconds for the same query on the same db???? The following query that took 16 seconds when run from my script took 73 sec, in php myadmin # Query_time: 16 Lock_time: 0 Rows_sent: 10 Rows_examined: 29703 SELECT * FROM `View2_DbbEddFT` WHERE MATCH(Topic, Subtopic, Theswords) AGAINST ('Judds' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Icey' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Charley' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) ORDER BY `Lnum` ASC LIMIT 0, 10 The following query took 14 seconds, in php myadmin SELECT * FROM `View2_DbbEddFT` WHERE MATCH(Topic, Subtopic, Theswords) AGAINST ('Judds' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Icey' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Charley' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) ORDER BY `Lnum` ASC LIMIT 0, 10 The following query identical to the one above, ran a second time took .0002 seconds, in php myadmin SELECT * FROM `View2_DbbEddFT` WHERE MATCH(Topic, Subtopic, Theswords) AGAINST ('Judds' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Icey' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('Charley' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) OR MATCH(Topic, Subtopic, Theswords) AGAINST ('' IN BOOLEAN MODE) ORDER BY `Lnum` ASC LIMIT 0, 10 Thank you in advance for any replies. Link to comment https://forums.phpfreaks.com/topic/59426-solved-wild-difference-in-query-access-times-what-goes-here/ Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Share Posted July 11, 2007 Does it matter that you're comparing values with nothing? I've never used queries using AGAINST... Link to comment https://forums.phpfreaks.com/topic/59426-solved-wild-difference-in-query-access-times-what-goes-here/#findComment-295282 Share on other sites More sharing options...
HowdeeDoodee Posted July 11, 2007 Author Share Posted July 11, 2007 Thank you for the reply. AGAINST is used in Full Text. The issue here is that I am running the same query and getting wildly different results. In one instance I am getting a slow query, in the next instance I am getting a fast query. Link to comment https://forums.phpfreaks.com/topic/59426-solved-wild-difference-in-query-access-times-what-goes-here/#findComment-295288 Share on other sites More sharing options...
Yesideez Posted July 11, 2007 Share Posted July 11, 2007 Different times I can understand but not different results - how strange??? Link to comment https://forums.phpfreaks.com/topic/59426-solved-wild-difference-in-query-access-times-what-goes-here/#findComment-295291 Share on other sites More sharing options...
HowdeeDoodee Posted July 11, 2007 Author Share Posted July 11, 2007 On a different thread in MySql, Illusion pointed out the results of a query are stored in a cache file. When the query is run again, the query time is less because the cache file is accessed. Link to comment https://forums.phpfreaks.com/topic/59426-solved-wild-difference-in-query-access-times-what-goes-here/#findComment-295370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.