From: | Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at> |
---|---|
To: | "'Bruce Momjian'" <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | "'hackers(at)postgresql(dot)org'" <hackers(at)postgresql(dot)org> |
Subject: | AW: [HACKERS] partial index |
Date: | 1998-08-12 08:57:32 |
Message-ID: | 01BDC5E0.B2CF5400@zeugswettera.user.lan.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce wrote:
>What is a partial index? I have never known.
A partial index is one that only indexes a subset of a table (e.g. restricted by a where clause).
This can be useful in many cases, one typical case is where all rows that are not null
in the index fields are to be indexed:
create index people_idx on people (childname) where childname is not null;
Note that I just made up the syntax (or is it postgresql syntax?). Some code for it lurks around.
Informix uses another syntax with a complete select statement, so you can also index a join:
CREATE GK INDEX gki
(SELECT A.col1, A.col2 FROM A, B, C
WHERE A.col1 = B.col1 AND B.col1 = C.col1)
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Zeugswetter | 1998-08-12 09:13:50 | AW: [HACKERS] Rule system |
Previous Message | Jan Wieck | 1998-08-12 08:55:11 | Rule system |