PDA

View Full Version : Listing ID limit?



Anonymous
11-05-2003, 01:06 PM
I am thinking this aloud, what if the Listing ID grows larger yrs later.. what is the limit? 999,999...

As the ID is accumulative, expired or deleted Listing ID will not be recycled.

Can we place a limit to say 5 digit? Then what would happen if reached 99999 ? Reset to 1?

the_sandking
11-06-2003, 10:14 PM
If you look at the DB table, I believe that the listing id 'ID' is 11 digits,

that's a pretty big number, but it is reachable....

A good question!

gwmbox
11-07-2003, 03:53 AM
Count yourself VERY lucky if you get 99,999,999,999 listings before you retire :) - damn if I got 9,999,999 in my lifetime I'd be happy :)

the_sandking
11-07-2003, 02:04 PM
Count yourself VERY lucky if you get 99,999,999,999 listings before you retire :) - damn if I got 9,999,999 in my lifetime I'd be happy :)

Actually this number becomes very reachable if you are updating OR on a daily basis from an extarnal database. Every time you drop rows to update the table from fresh data the ID will automatically increment for the new values.
This really becomes a problem with lisitingsDBElements, because it contains 1 row for every "listing-item" in listingsDB, so in my case every time I drop/add 1 listing (1 row) to listingsDB, 50 rows are dropped/added to listingsDBElements.

After 2 months, my listingsDBElements is up over 2,200,000 (ID #'s)

This means I will hit your "target" of 9,999,9999 within 9-months of initially installing..

There are better ways to update the DB (without dropping rows first) but sometimes you are at the mercy of your external data source... :)

Anonymous
11-08-2003, 01:42 PM
Besides importing external data or having 99,999,999 listings, I am talking abt limiting the numbers of digit.

Having too long ID (eg: pls refer to my listing ID: 1121212121) is not very user friendly.

So limiting to 5 digits (eg:99999) and recycling those deleted/ expired listing ID may better. Or using alpha-numeric (eg:FFF99) will go a long way, even with just 5 digits.