Re: php/mysql error
| From: | David Robley | Date: | Wed, 28 Jul 2004 03:02:57 +0000 |
| Subject: | Re: php/mysql error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35472@lists.php.net to get a copy of this message | ||
On Wed, 28 Jul 2004 02:36, Redhat wrote:
> I am getting a weird error on one of my servers that says something
> about "query requires full tablescan". I was not getting this error
> until today that I noticed. I Googled for a minute and saw where a ton
> of other sites had the same problem but no "reason" why. I did find one
> board that said to turn off "mysql.trace_mode" in the php.ini file. I
> did this and it fixed the problem. Is there something different that I
> should be doing when I write code? Have I just "band aided" the problem
> or solved the problem?
> thanks,
> Doug
You are possibly using a query without indexes. Try running EXPLAIN on your
query, and have a look at this page from the mysql site which tells more
about table scans.
http://dev.mysql.com/doc/mysql/en/How_to_avoid_table_scan.html
Cheers
--
David Robley
Help! I'm lost somewhere in the Generation Gap.