From: | Chris <croffler(at)earthlink(dot)net> |
---|---|
To: | Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: XML Index again |
Date: | 2010-03-07 12:18:33 |
Message-ID: | 2829441.1267964313648.JavaMail.root@elwamui-little.atl.sa.earthlink.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Alban
thanks for your replay. Yes I am looking for node exists ...
I'll give it a roll.
>There are a couple of cases where Postgres won't use your index, but in this case it's quite clearly because you're asking for (quite) a different expression than the one you indexed.
>
>You seem to want to test for the existence of nodes with a specific name, maybe this is what you're looking for?:
>
>SELECT id FROM time_series t1 WHERE EXISTS (
> SELECT 1
> FROM time_series t2
> WHERE (xpath('/AttributeList/Attributes/Attribute/Name/text()', external_attributes))[1]::text = ('Attribute122021', external_attributes)
> AND t2.id = t1.id
>);
>
>It's just a guess at what you're trying to do, so I may very well have gotten it wrong. The important part is that you need to use the expression you indexed in your where clause, or the database has no idea you mean something similar as to what you indexed.
>
>Alban Hertroys
>
>--
>If you can't see the forest for the trees,
>cut the trees and you'll see there is no forest.
>
>
>!DSPAM:737,4b9389db296924445911763!
>
>
>
>--
>Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2010-03-07 12:32:29 | timestamp literal out of line |
Previous Message | Massa, Harald Armin | 2010-03-07 11:37:33 | accessing the words in a full text index |