If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Numeric vs. char IDs and URL rewriting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-04, 21:12
killerking killerking is offline
Registered User
 
Join Date: Feb 2004
Location: argentina
Posts: 5
Numeric vs. char IDs and URL rewriting

Hello all, hope you can help me with your experience or some links here, as I don't have any experience on this.

I'd like to know about differences in performance between numeric IDs and short string IDs.

My problem is: I'm builing a mid-sized site (about 1000 pages), and I don't want to go with the ugly and unuseful ?pageid=548 querystrings.

So I though of an approach like I've seen you doing with mod_rewrite.

My querystring now is like: www.site.com/?section/subsection/article

I'm on apache + chilisoft asp + mysql. The "rewrite" is simply the querystring going into an sql query.

I could think of two approaches for this:

1. NUMERIC IDs: these are the standard. I (think) get a faster search for an article once I have an ID, but to get an ID from that querystring I'd have to do a string lookup and some join anyway.

2. STRING IDs: these fit straightforward into the url-as-querystring scheme, and can easily be checked for duplication before inserting a new article. But I fear, as it's not the "textbook" aproach and there might be a reason (performance?) for this.

Also, a mixed approach could work
(like ?secion/subsection/548)

Let me know what you think, thanks for your help

- Manuel Razzari
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On