Previous Thread
Next Thread
Print Thread
Rate Thread
#210772 05/18/2001 2:14 PM
Joined: Feb 2001
Posts: 20
User
User
Offline
Joined: Feb 2001
Posts: 20
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 =



= Jim =
Sponsored Links
Entire Thread
Subject Posted By Posted
Recently added posts aantix 05/18/2001 10:14 PM
Re: Recently added posts Rick 05/19/2001 5:53 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,957
Members13,826
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3418
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 25
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261026)