Re: Doubts about oid

Поиск
Список
Период
Сортировка
От Jayadevan M
Тема Re: Doubts about oid
Дата
Msg-id OFFDD503B5.841F48F8-ON652576CF.001855F9-652576CF.0018E111@ibsplc.com
обсуждение исходный текст
Ответ на Re: Doubts about oid  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
Hi,
>  Even in Oracle, I don't believe rowid bypasses
> indexes, its more like an implicit SERIAL PRIMARY KEY field.

Well, I understand the point is not very relevant, since oid is not similar to rowid. In Oracle, index scans are bypassed if we use rowid.

1)Access by unique index

SQL> select * from myt where id=200;
Execution Plan
----------------------------------------------------------
Plan hash value: 1325982734

--------------------------------------------------------------------------------

----

| Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time
   |

--------------------------------------------------------------------------------

----

|   0 | SELECT STATEMENT            |      |     1 |    65 |     1   (0)| 00:00:

01 |

|   1 |  TABLE ACCESS BY INDEX ROWID| MYT  |     1 |    65 |     1   (0)| 00:00:

01 |

|*  2 |   INDEX UNIQUE SCAN         | MYDX |     1 |       |     1   (0)| 00:00:

01 |

--------------------------------------------------------------------------------

2) Access by rowid

SQL> select * from myt where rowid='AAAH9iAAEAAAAafADH';

        ID
----------
NAME
--------------------------------------------------------------------------------

       200
REFCON$



Execution Plan
----------------------------------------------------------
Plan hash value: 4204525950

--------------------------------------------------------------------------------

---

| Id  | Operation                  | Name | Rows  | Bytes | Cost (%CPU)| Time
  |

--------------------------------------------------------------------------------

---

|   0 | SELECT STATEMENT           |      |     1 |    77 |     1   (0)| 00:00:0

1 |

|   1 |  TABLE ACCESS BY USER ROWID| MYT  |     1 |    77 |     1   (0)| 00:00:0



Regards,
Jayadevan





DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."





В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Doubts about oid
Следующее
От: Lew
Дата:
Сообщение: Re: GROUP BY column alias?