NameSilo

Speed up MySQL query

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

dubya

Established Member
Impact
3
Hey all,

I have a database of around 400,000 business listings, with 30 or so fields.

When a user searches by zipcode and category, the search sometimes takes a minute or two based on the amount of data in that area.

Are there any corners I could cut, or simple queries I could run to speed up the process?

Any help, or resources would be great.

Thanks,
Dave
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
When a user searches by zipcode and category, the search sometimes takes a minute or two based on the amount of data in that area.

Hi Dave,

Try adding INDEXES to the `zipcode` and `category` fields. This will help considerably.

Regards,
Peter
 
0
•••
That seemed to work just fine.

Thanks, +rep!
 
0
•••
Also if your database had become fragmented from deletes you should use the optomise table tool.
 
0
•••
I would assume mysql is similar to postgre in that you can change the size of your buffer pool. You probably want it about 2/3 of your total memory so that it'll increase the chances of a hit while not hindering your overall performance. Adding additonal indexes will also help as psalzmann stated.
 
0
•••
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Parking: find your domains by pasting a list
You can now paste a list of domain names into the search box at the top of the Parking menu. Put one name on each line. Your domain list...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back