Re: Mysql Rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Another point to consider, is that Tedds method of renumbering the rows,
*may* not preserve the original sequence.  I have not checked the mysql
source, but if some delete activity has occurred in the table, then
there will be holes in the data, in some circumstances, inserting
further records to the table, some may go on the end, and some may fill
the holes.  I suspect that using Tedd's method of dropping the column,
and then re-adding the column, the auto increment, will either be added
in the physical sequence of the table, or added in the order of any
index that may be traversed in this process.  As an extreme example, if
one had a table with 5 million rows, and then deleted the first 4.5
million rows, where will the next insert go?  One of the benefits of a
relational database, is that you do not need to consider how the data is
physically stored.

Best regards... Dusty

jblanchard@xxxxxxxxxx wrote:
> [snip]
> That's the reason when I started this thread I made it clear that I 
> was NOT talking about a relational dB but rather a simple flat file.
> 
> What I find interesting in all of this exchange -- however -- is that 
> everyone agree's renumbering the "id" of a dB is something you don't 
> do, but no one can come up with a concrete (other than relational) 
> reason why.
> 
> [/snip]
> 
> Tedd, several here, including me, have said that if you have only a
> single table database that renumbering is OK, just not a preferred
> practice. (BTW, you never answered my question about this being a flat
> file database or single table, although I have figured it out now.)
> Renumber to your heart's content. If your users are allowed delete
> privileges (ACK!) and you don't want to confuse them, go ahead and
> renumber. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux