December 13th, 2012, 11:34 AM
-
Postgres xml indexes
Hi guys,
I store xml objects in a postgres table: table(xml_id, xml_src)
example:
Code:
<xmlobject>
<name>james</name>
<category>3</category>
<marks>ACTION,HORROR,THRILLER</marks>
<search_attributes>
<searchattribute>
<type>DOUBLE</type>
<name>Double</name>
</searchattribute>
<searchattribute>
<type>SINGLE</type>
<name>single</name>
</searchattribute>
</search_attributes>
</xmlobject>
Now I want to do a full table search. I want to search after category, marks and the search attributes.
example:
select all objects where category is 3, marks contains HORROR and ACTION, and the searchattribute contains DOUBLE.
Performance is very important. Maybe you can give me hints how I have to index. I use xpaths...
I would be very happy, if there is someone, who can help me...
thanks and bye
December 14th, 2012, 09:06 AM
-
: (
nobody can give me an advice?
December 17th, 2012, 03:55 AM
-
Just create the indexes on the expressions you use in your where clause.
I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags.
http://forums.devshed.com/misc.php?do=bbcode#code
Tips on how to ask better questions:
http://tkyte.blogspot.de/2005/06/how-to-ask-questions.html
http://wiki.postgresql.org/wiki/SlowQueryQuestions
http://catb.org/esr/faqs/smart-questions.html