List:General Discussion« Previous MessageNext Message »
From:Patrick Sherrill Date:November 8 2003 2:28pm
Subject:Re: ROWID
View as plain text  
We add an auto_increment BIGINT to every table we create.  This gives us the
essence and utility of ROWID (BTW we always name the first column in a new
table 'row_id').

Just my 2 cents
Pat...

patrick@stripped
CocoNet Corporation
SW Florida's First ISP
825 SE 47th Terrace
Cape Coral, FL 33904
(239) 540-2626 Voice


----- Original Message ----- 
From: "Jeremy Zawodny" <Jeremy@stripped>
To: "Mike Brando" <mbrando@stripped>
Cc: <mysql@stripped>
Sent: Friday, November 07, 2003 8:49 PM
Subject: Re: ROWID


> On Thu, Nov 06, 2003 at 01:02:31PM -0800, Mike Brando wrote:
> >
> > > -----Original Message-----
> > > On Thu, Nov 06, 2003 at 09:59:41AM -0800, Wan, Wenhua wrote:
> > > > Hi there,
> > > >
> > > > Both Oracle and Informix use ROWID to uniquely represent the
location of
> > > > each row of data in a table.  ROWID is basically a hidden column or
> > > > pseudocolumn for each table, and it is the fastest way to retrive a
row
> > > from
> > > > a table.  Does MySql have similar field?  If is, what's the name and
how
> > > to
> > > > access it?
> > > >
> > > > Thank you very much in advance for your advice.
> > >
> > > http://www.mysql.com/doc/search.php?q=rowid
> > >
> >
> >
> > Ok, so that search produces this:
> >
> > " If the PRIMARY or UNIQUE key consists of only one column and this is
of type
> > integer, you can also refer to it as _rowid (new in Version 3.23.11)."
>
> Yes.
>
> > But that's not what a "ROWID" is compared to what I think the
> > original poster was looking for.
>
> One hopes he figured that out after reading the description.
>
> > In Oracle for example, a ROWID is the unique address of a row in the
> > database. Every row, unique key or not has a unique address. Is
> > there such a thing in MySQL?
>
> No.  If there was it'd be documented.  But at lesat with MyISAM
> tables, MySQL cannot guarantee the "address" (or row number) of a
> row.  An ALTER/REPAIR/OPTIMIZE may reorder the rows.
>
> > ROWIDs are extremely useful for guaranteeing that you are
> > manipulating the exact row that you think you are.
>
> So I've been told.
>
> Jeremy
> -- 
> Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
> <Jeremy@stripped>  |  http://jeremy.zawodny.com/
>
> MySQL 4.0.15-Yahoo-SMP: up 55 days, processed 2,063,471,142 queries
(433/sec. avg)
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>

Thread
ROWIDWenhua Wan6 Nov
  • Re: ROWIDJeremy Zawodny6 Nov
    • RE: ROWIDMike Brando6 Nov
      • RE: ROWIDDathan Vance Pattishall6 Nov
      • Re: ROWIDChris Boget6 Nov
      • RE: ROWIDDaniel Kiss6 Nov
      • Re: ROWIDJeremy Zawodny8 Nov
        • Re: ROWIDDan Nelson8 Nov
    • Re: ROWIDPatrick Sherrill8 Nov