Re: Antwort: Re: Why Heap Tables doesn´t support auto increment ?colums

2001-03-02 Thread Alexander Skwar

So sprach Gerhard Schmidt am Thu, Mar 01, 2001 at 04:02:54PM +0100:
 Besides the fakt tha this ID not unique. There ist the Problem that 
 the ID you proposed ist an String ID and strings als Index are the 

Well, but he could make a two column primary key, where the first is the
timestamp, and the second an unsigned int holding the ip, if the ip is first
transformed from the usual dotted notation (1.2.3.4) to the "raw" number
(which would be 4+3*256+2*256*256+1*256*256*256 in this case - 16909060 ). 
Thus would give a timestamp + integer key, which is fast to index.

 The question still is. Why are auto_increment columns are not supported 

True.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 15 hours 19 minutes

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why Heap Tables doesn´t support auto increment colums

2001-03-01 Thread Richard Ellerbrock

Why not use a timestamp column to guarentee the order in which rows get
inserted into the table? You can then order on the timestamp column.

Gerhard Schmidt wrote:
 
 --d6Gm4EdcadzBjdND
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi,=20
 
 I wounder why there is no support for Auto_increment fields in Heap
 tables. I know there is a problem with the uniqueness of this columns=20
 but some times the uniqueness of the column is only needes as long=20
 as the heap table exists.=20
 
 I=B4m currently working on system for Managing http Session and would like=
 =20
 to use a heap table for storing the session information. Session=20
 information is only of temporary intrest. But still I need an unique=20
 ID for reference with some other Tabels storing dtaa for the session.=20
 All these tables are Heap tables. So there is no Probelem if the ID=20
 generated by the auto_increment column is not unique when the Database
 server is restarted.=20

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Antwort: Re: Why Heap Tables doesn´t support auto increment ?colums

2001-03-01 Thread Gerhard Schmidt

On Thu, Mar 01, 2001 at 02:37:30PM +0100, Entryon Corp., Chief Technical Officer - P. 
Hasenfratz wrote:
   Why not use a timestamp column to guarentee the order in which rows get
   inserted into the table? You can then order on the timestamp column.
 
  Hmm, timestamp, ie. seconds as finest resolution, might be to broad
 depending on
  the hits his site will get - imagine that 2+ users access the site in the
 same
  second, then you won't be able to distinguish them, will you?
 
 What's if you combine a timestamp with the client's IP address?
 
 for example:
 
 5/6/2001
 IP : 212.33.69.2
 
 = clientstamp will be 05.06.2001-212.033.069.002

Besides the fakt tha this ID not unique. There ist the Problem that 
the ID you proposed ist an String ID and strings als Index are the 
Major Preformance killer on Databases. Wie kann calculate an intager 
from the two information. totaly loosing the Uniqueness. 

The question still is. Why are auto_increment columns are not supported 
fuer Heap Tables. 

SoLong 

Estartu

-- 
Gerhard Schmidt   mailto:[EMAIL PROTECTED]
Entwicklung

adMaster network  Tel.: +49 89 38356-334
Kaiserstrae 16
D-80801 Mnchen   http://www.admasternetwork.net

 PGP signature


Re: Why Heap Tables doesn´t support auto increment colums

2001-03-01 Thread Joe Kislo

 Im currently working on system for Managing http Session and would like
 to use a heap table for storing the session information. Session
 information is only of temporary intrest. But still I need an unique
 ID for reference with some other Tabels storing dtaa for the session.
 All these tables are Heap tables. So there is no Probelem if the ID
 generated by the auto_increment column is not unique when the Database
 server is restarted.

There's a couple problems with that to begin with.  First, you're
storing state in a HEAP table.  If the mysql server gets reset, all the
sessions are lost.  It would be tough to think you want to write your
system so your database server cannot ever be restarted, especially when
writing the data to a MyISAM table would probably be at a trivial loss
of speed.  Also, if you used an auto_incrementing column, you would be
handing out sessionIDs sequentially.  It would be trivial for somebody
to usurp somebody else's sessionID by simply subtracting or adding 1 to
their own.  

-Joe

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php