Re: ROWID
In the last episode (Nov 07), Jeremy Zawodny said: 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 least with MyISAM tables, MySQL cannot guarantee the address (or row number) of a row. An ALTER/REPAIR/OPTIMIZE may reorder the rows. A ROWID is actually a packed representation of datafile, segment, block and row, so anything that rebuilds a table in Oracle changes ROWIDs too. They're not meant to be a permanent pointer. MySQL could probably do the same thing by returning a 4 or 8-byte offset into the .MYI file for MyISAM tables. You would have to return the primary key for BDB tables, and I don't know enough about InnoDB's layout to guess. Basically, whatever pointer non-primary indexes use to locate records can be called a ROWID. ROWIDs are extremely useful for guaranteeing that you are manipulating the exact row that you think you are. So I've been told. They've got an O(1) access time, so they're also useful for remembering sets of rows in a multi-query operation; pull the ROWIDs once, then use WHERE ROWID in ( rowidlist ) later. -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ROWID
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... [EMAIL PROTECTED] CocoNet Corporation SW Florida's First ISP 825 SE 47th Terrace Cape Coral, FL 33904 (239) 540-2626 Voice - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Mike Brando [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] 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! [EMAIL PROTECTED] | 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/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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! [EMAIL PROTECTED] | 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/[EMAIL PROTECTED]
Re: ROWID
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 Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/ MySQL 4.0.15-Yahoo-SMP: up 53 days, processed 2,006,935,277 queries (431/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ROWID
-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). But that's not what a ROWID is compared to what I think the original poster was looking for. 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? ROWIDs are extremely useful for guaranteeing that you are manipulating the exact row that you think you are. Mike -- Michael Brando Senior Manager of Engineering Applied Biosystems 3833 North First Street San Jose, CA 95134-1701 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ROWID
U could always use a PRIMARY key on an auto_increment column. - Dathan Vance Pattishall - Sr. Programmer and mySQL DBA for FriendFinder Inc. - http://friendfinder.com/go/p40688 ---Original Message- --From: Mike Brando [mailto:[EMAIL PROTECTED] --Sent: Thursday, November 06, 2003 1:03 PM --To: [EMAIL PROTECTED] --Subject: RE: ROWID -- -- -- -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). -- --But that's not what a ROWID is compared to what I think the original --poster --was looking for. 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? ROWIDs are extremely useful for guaranteeing that --you --are manipulating the exact row that you think you are. -- --Mike -- --- - --Michael Brando --Senior Manager of Engineering --Applied Biosystems --3833 North First Street --San Jose, CA 95134-1701 -- -- --MySQL General Mailing List --For list archives: http://lists.mysql.com/mysql --To unsubscribe: --http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ROWID
But that's not what a ROWID is compared to what I think the original poster was looking for. 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? ROWIDs are extremely useful for guaranteeing that you are manipulating the exact row that you think you are. In PGSQL, this is analogous to OID, yes? Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ROWID
No. There is no physical address of a row in MySQL. 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). But that's not what a ROWID is compared to what I think the original poster was looking for. 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? ROWIDs are extremely useful for guaranteeing that you are manipulating the exact row that you think you are. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: rowid
MySQL supports _rowid. _rowid is defined as a synonym for the primary key if the primary key consists of one column and is an integer. Hope this helps, John Griffin -Original Message- From: geeta varu [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 11:54 PM To: [EMAIL PROTECTED] Subject: rowid i would like to use rowid in my query does mySQL support this ..if s how do i give in query please help... __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ - 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 - 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: rowid
On Thursday 27 February 2003 06:54, geeta varu wrote: i would like to use rowid in my query does mySQL support this ..if s how do i give in query please help... From the MySQL manual: 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). -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - 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