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. Quote Link to comment 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... Quote Link to comment 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. Quote Link to comment 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??? Quote Link to comment 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. Quote Link to comment 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.