Why is only the first row, ROW_NO = 0, being used in the $R table?

(Doc ID 2318422.1)

Last updated on OCTOBER 17, 2017

Applies to:

Oracle Text - Version 11.2.0.3 and later
Information in this document applies to any platform.

Goal

Why is only the first row, ROW_NO = 0, being used in the $R table?

Technical Overview: DML Processing in Oracle Text (Doc ID 104262.1) states:

$R The ROWID mapping table

This is designed for the opposite lookup from the $K table - fetching a
ROWID when you know the DOCID value. Given that ROWIDs are a fixed
length (14 bytes), and DOCIDs are allocated sequentially, it is possible
to write all rowids into a binary structure and any specific docid by
reading the 14 bytes starting at position ( 1 + (DOCID*14) ).

In practice, this binary structure is split over several rows in the $R
table to prevent any single row getting two large, but this makes no
difference to the principle.

------

Test on 12.1.0.2 database:

SQL> select count(*) from glenn;

COUNT(*)
----------
1630120

SQL> desc DR$GLENNI$R
Name Null? Type
----------------------------------------- --------
----------------------------
ROW_NO NOT NULL NUMBER(3)
DATA BLOB

SQL> select row_no, length(data) from DR$GLENNI$R;

ROW_NO LENGTH(DATA)
---------- ------------
0 22821680

SQL> select count(*) from glenn;

COUNT(*)
----------
1630120


 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms