Xpath Index in PostgreSQL

Поиск
Список
Период
Сортировка
От Chris Roffler
Тема Xpath Index in PostgreSQL
Дата
Msg-id 3984722a1003050443s754e6bfam410e901cee1e5ef@mail.gmail.com
обсуждение исходный текст
Ответы Re: Xpath Index in PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I am trying to setup an index on an xpath expression but the query never uses the index.
Could someone enlighten me please ?

Here is the setup :

CREATE TABLE time_series
(
  id bigint NOT NULL,
  "name" character varying NOT NULL,
  "timestamp" timestamp with time zone NOT NULL,
  start_date timestamp with time zone,
  end_date timestamp with time zone,
.............
  external_attributes xml,
 ..............
)
WITH (
  OIDS=FALSE
);


CREATE INDEX xml_index
  ON time_series
  USING btree
  ((xpath('/AttributeList/Attributes/Attribute/Name/text()'::text, external_attributes)::text[]));

  
And here is the query :

select id, name 
 from 
  time_series 
 where  
(xpath('/AttributeList/Attributes/Attribute/Name/text()', external_attributes))[1]::text='Attribute100'


В списке pgsql-general по дате отправления:

Предыдущее
От: venkatrao.b@tcs.com
Дата:
Сообщение: Re: [NOVICE] Is there any oracle user_source table equivalent in postgre?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Xpath Index in PostgreSQL