Re: XML index

From: Chris Roffler <croffler(at)earthlink(dot)net>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: XML index
Date: 2010-05-27 14:57:42
Message-ID: AANLkTikpt0Oa2GkJDhH_Pd6N8GgvGq45ZvSzYBGmmbaH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Changed the create index statement to : USING hash and it seems to work.

Any idea why btree does not work ?

Thanks
Chris

On Thu, May 27, 2010 at 3:47 PM, Chris Roffler <croffler(at)earthlink(dot)net>wrote:

> Tried that .... same thing
>
>
> On Thu, May 27, 2010 at 1:53 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>
>> On 27 May 2010 12:22, Chris Roffler <croffler(at)earthlink(dot)net> wrote:
>> > I have a table with an xml column, created an index as follows:
>> > CREATE INDEX xml_index
>> > ON test
>> > USING btree
>> > (((xpath('//*/ChangedBy/text()'::text,
>> external_attributes))[1]::text));
>> > And here is my select statement:
>> > Select uuid from t
>> > where (xpath('//*/ChangedBy/text()', external_attributes))[1]::text =
>> > 'User';
>> > I then insert 100rows into this table, then do a select with the above
>> > statement.
>> > Explain shows that the query is using the xml_index.
>> > Now I insert 5000 more rows and Explain shows that the query does not
>> use
>> > the xml_index anymore.
>> > However, if I drop the index and re create it, then Explain tells me
>> that
>> > it's using the index again.
>> > Any ideas what is going on here ?
>> > Thanks
>> > Chris
>> >
>>
>> I'd run an ANALYZE after inserting 5000 more rows. The stats will be
>> out of date.
>>
>> Thom
>>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-27 15:02:37 Re: hi, trying to compile postgres 8.3.11
Previous Message Joshua Tolley 2010-05-27 14:56:28 Re: Statement Pooling