From: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
---|---|
To: | "Gyozo Papp" <pgerzson(at)freestart(dot)hu>, "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: index ops for _int4 and trees? |
Date: | 2001-05-16 01:41:47 |
Message-ID: | 3.0.5.32.20010516094147.0101a400@192.228.128.13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
At 06:29 PM 15-05-2001 +0200, Gyozo Papp wrote:
>Oh,
>I forgot that without any contrib you can select rows whose papth to the
root {1,2,3}:
>
>select * from test where lineage[1:3] = '{1,2,3}';
>but the gist indexing (intarray) performs a significant speed increase.
Thanks.
>BTW, lineage represents egde-list of a directed graph or a tree ?
>> insert into test (id,lineage) values ('8','{1,2,3}');
>------------------------------------------------|-^
>> insert into test (id,lineage) values ('9','{1,3,7}');
>It seems to me that node 3 can be accessed from both node 1 and node 3
directly, or it's just a mistake?
It's a mistake in my example.
Aside but related:
Oleg Bartunov also mentioned that subset searches are possible with gist:
select * from table <TABLE> where <array_field> @ '{1,2,3}'
So I've asked him whether his work on gist indexing int arrays can be used
to do substring indexing on text, as a built-in to Postgresql.
I think it can be done. Then subtext_ops here we come :).
If not I'll resort to converting text characters to their code values and
stuffing them into int arrays. Ugly :). Not sure what happens when the
arrays get large.
Cheerio,
Link.
From | Date | Subject | |
---|---|---|---|
Next Message | Al Frick | 2001-05-16 02:05:36 | Which OS to Use for Postgresql |
Previous Message | John Clark L. Naldoza | 2001-05-16 00:44:16 | Re: Not a PG question: SCSI question |
From | Date | Subject | |
---|---|---|---|
Next Message | Steve O'Hagan | 2001-05-16 02:18:24 | Re: Re: Internet is putting lot of competition fire & heat under Microsoft SQL Server |
Previous Message | John Clark L. Naldoza | 2001-05-16 00:44:16 | Re: Not a PG question: SCSI question |