OldProgrammer
Programmer
Hopefully someone can suggest something:
I've got a default MySQL installation running on Linux. Single table queries access acceptably (normally sub second) however when I do a simple 2 query table I get ridiculous results
Table a - 30,000 rows - (approx 100bytes)
Table b - 460,000 rows - (approx 120bytes)
Query is select count(*) from tablea a, tableb b
where a.indxkey = b.indxkey
The indxkey is the right part of a unique index for both tables. I'd have expect an index scan which the Explain indicates will happen. The query takes 1.5 hours!
I've set up my.cnf as a copy of my-huge.cnf since I have 2GB of memory to play with.
I'm assuming that there's something in the configuration and would be grateful for some pointers....
Rgds
I've got a default MySQL installation running on Linux. Single table queries access acceptably (normally sub second) however when I do a simple 2 query table I get ridiculous results
Table a - 30,000 rows - (approx 100bytes)
Table b - 460,000 rows - (approx 120bytes)
Query is select count(*) from tablea a, tableb b
where a.indxkey = b.indxkey
The indxkey is the right part of a unique index for both tables. I'd have expect an index scan which the Explain indicates will happen. The query takes 1.5 hours!
I've set up my.cnf as a copy of my-huge.cnf since I have 2GB of memory to play with.
I'm assuming that there's something in the configuration and would be grateful for some pointers....
Rgds