Thank you very much! I am a first year software engineer so I'm still
learning :-)
I had a query that took 23 seconds, and now takes .01 sec.
Thanks again!
Rob Taft
-
Before posting, please check:
http://www.mysql.com/manua
Rob Taft wrote:
I have 2 tables, one with 1,000 entries, the other with 10,000 entries. I'll
call these table1 and table2. The query uses both tables:
SELECT FROM table1 LEFT JOIN table2 ON (table1.ID =
table2.table1_ID) WHERE ;
Do you have indexes on these?
alter table2 add index table1_i
Rob,
as Jennifer stated, the problem is that your query doesn't use indexes.
> SELECT FROM table1 LEFT JOIN table2 ON
(table1.ID =
> table2.table1_ID) WHERE ;
would be of interest here. If MySQL can't use indexes
here, it will have to scan all of table2 (the big one) to find out which
rows mat
Are you using indexes on your tables? This does not sound like a mysql bug,
but rather a problem with your table structure or query. I have seen much
more complicated joins work on much larger tables without any problem, as I
am sure many people on this list have as well. You should run an expla