the id field is a primary index at 192420 right now
Main Topics
Browse All TopicsHi.
I have a database with about 200k entries, and i try to show 20 next entries from entrynum ie. 84800.
This takes 4-8 seconds to execute, wich is way to long for å web-site.
Is there any way to execute this faster?
See the code field for the code i use.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
instead of selecting everything, select only the fields you will be using.
making other fields indexed helps. (should not have more then 3 indexed fields in a table)
If your "reported" field is an ENUM type set to '0','1' there is no point including it into your statement, because you are not filtering on it.
This means the sorting of the query takes 3-6 seconds wheras the query itself takes 1 second. There isn't anything more that can be optimized with the query itself. The only thing left to tweak would be the mysql configuration itself by increasing buffers to prevent the impact of the order by clause.
You should try increasing your sort_buffer_size to prevent the sort to be done in a temporary table on the disk instead of in ram. Increasing read_buffer_size and read_rnd_buffer_size may also help speed up the query and the sort.
Business Accounts
Answer for Membership
by: alain34Posted on 2009-09-16 at 08:41:22ID: 25346834
Hello us-pata,
Could you tell use if you have an index on any columns?
Regards,
alain34