SunQuest
           Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 21st, 2003, 08:10 PM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
mysql default insertion order

Hi,

I usually have an auto_incremented primary key as my tables. And, usually, when I insert into these tables, mySQL adds the new row to the end, so that this primary key will be sorted ascending. However, it seems that once in a while mySQL inserts the item at random. Is there a reason that this happens?

Thanks.

Reply With Quote
  #2  
Old February 22nd, 2003, 06:17 PM
JeT JeT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 28 JeT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to JeT
RE: mysql default insertion order

If you delete one of the rows, the next row insert might try to take it's value I think. Like if you had 16 rows, and you deleted row number 13, it might go into row 13.

I'm not sure if this is what you mean though?

Reply With Quote
  #3  
Old February 22nd, 2003, 10:23 PM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: mysql default insertion order

Yes, I think that might be one of the reasons... it's very weird, though.

I think I'll just play it safe from now on and sort by asc on the primary column by default when I select data out.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > mysql default insertion order


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway