Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance problems with basic queries:

Status
Not open for further replies.

OldProgrammer

Programmer
Sep 13, 2002
5
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top