Forum Moderators: open
this checks over 300,000 records and takes ~10 seconds to query.
I tried indexing the price field but it doesnt make any difference, is there anything at all I can do so it doesnt have to check all those 300,000+ rows?
Alternatively, you can build a separate Prices table, where the fields are shop, MinPrice, and MaxPrice. Periodically repopulate that table then run your other queries off that table.
Or if your prices are updated frequently, set a trigger to update the row for that shop whever there is a price change.
the extra table is something I could look at.
i tried increasing some values such as key_buffer and sort_buffer_size in the my.cnf file but it made little difference. is this file largely for just making little 1 or 2% performance tweaks?
my server only has 512MB RAM, would an upgrade help? or would that again be just a small performance increase?
thank you for the replies.