From: | Christopher Zach <zach(at)icg(dot)tu-graz(dot)ac(dot)at> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Using oids for fast read-only access? |
Date: | 2001-08-10 21:09:48 |
Message-ID: | 01081017094801.21947@fcggpc47.icg.tu-graz.ac.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've implemented r-trees on top of PostgreSQL (since I need more control over
the r-tree than you can have with the r-tree index that comes with
PostgreSQL) and I would like to know whether there is an efficient way to
dereference the data in the leaves.
Currently the geometry database looks like this:
Table "geometry"
Attribute | Type | Modifier
-----------+------------------+----------
id | integer |
x1 | double precision |
y1 | double precision |
z1 | double precision |
x2 | double precision |
y2 | double precision |
z2 | double precision |
Indices: geometry_index (on id)
The leaves in the corresponding rtree store id's.
After inserting the geometry, the data is read only, therefore I would like
to replace the id's in the rtree with oids (or anything that has a constant
time access).
The problem is that a "select * from geometry where oid=xxx" is a lot slower
than selecting objects by their id (since the former does a seq scan and the
later an index scan).
The PostgreSQL documentation doesn't say much about oids and their use,
therefore I need al little help...
best wishes,
Christopher Zach
From | Date | Subject | |
---|---|---|---|
Next Message | Sue Lane | 2001-08-10 21:22:17 | Re: Ora2pg.pl - some feedback |
Previous Message | pgsql-general | 2001-08-10 20:09:25 | Re: Ora2pg.pl - some feedback |