Scream -
I have written a script that gets the last 10 written posts from the w3t_posts table.
We would like to display these recently added posts on our main index page, the problem being is that there are 20,000 messages in our database already (we are developing a large system).
My question is this : Is the db smart enough to index these recently added posts efficiently so that they are easily retreived, or is everytime this script runs, the db will traverse through the entire table with some 20,000 entries, looking for the most recent 10 added?
I don't know enough about database design to answer this myself, so please enlighten me. Please describe what the difference between a 'key' and 'index' is, if this is relavent to my question.
We are currenty running PHP version 5.1.6.
Thanks in advance.
= Jim =