| From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> | 
|---|---|
| To: | astro77 <astro_coder(at)yahoo(dot)com> | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: Slow select times on select with xpath | 
| Date: | 2009-09-22 05:12:30 | 
| Message-ID: | 4AB85CBE.4020803@cheapcomplexdevices.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
astro77 wrote:
> Thanks Kevin. I thought about using tsearch2 but I need to be able to select
> exact values on other numerical queries and cannot use "contains" queries.
You might be able to make use of a custom parser for tsearch2 that creates
something like a single "word" for xml fragments like <whatever>1</whatever>
which would let you quickly find exact matches for those words/phrases.
> It's got to be fast so I cannot have lots of records returned and have to do
> secondary processing on the xml for the records which contain the exact
> value I'm looking for. This is one of the reasons I moved from using Lucene
> for searching. I hope this makes sense.
> 
> 
> Kevin Grittner wrote:
>>  wrote:
>>  
>>  
>> I would try to minimize how many XML values it had to read, parse, and
>> search.  The best approach that comes to mind would be to use tsearch2
>> techniques (with a GIN or GiST index on the tsvector) to identify
>> which rows contain 'fdc3da1f-060f-4c34-9c30-d9334d9272ae', and use AND
>> to combine that with your xpath search.
>>  
>> -Kevin
>>
>>
>>
> 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Magnus Hagander | 2009-09-22 06:42:53 | Re: statement stats extra load? | 
| Previous Message | Scott Marlowe | 2009-09-21 23:39:05 | session servers in ram |