Allowing MySQL to process more than 1 query at once

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Allowing MySQL to process more than 1 query at once

Post by impulse() »

We have a FreeBSD server running MySQL 4 that is used heavily but a problem I'm running into sometimes is that I can run a query that takes several minutes to complete and this is bottlenecking the server leaving hundreds of other queries in a que while my fat query get processed.
Is there any server configuration that would allow those queries in the que to get processed while my fat query continues?

Thanks,
User avatar
playgames
Forum Newbie
Posts: 22
Joined: Tue Sep 04, 2007 4:28 am

Re: Allowing MySQL to process more than 1 query at once

Post by playgames »

are you used index key for the table?
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Re: Allowing MySQL to process more than 1 query at once

Post by impulse() »

Yes.

I have 3 tables and 2 of those have over 4 million rows in, which is causing the hold up. But my query is selecting every row in the table anyway.
User avatar
playgames
Forum Newbie
Posts: 22
Joined: Tue Sep 04, 2007 4:28 am

Re: Allowing MySQL to process more than 1 query at once

Post by playgames »

post up table's structure and index key .

maybe you need to partition your table (but mysql4 not support it,only mysql 5)
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Allowing MySQL to process more than 1 query at once

Post by Eran »

Run EXPLAIN on the query and post the results here
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Allowing MySQL to process more than 1 query at once

Post by s.dot »

The table's probably being locked while waiting for your query to finish executing. I'm not sure what you can do about it, but reading about table locks couldn't hurt.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply