Re: simple function index question
От | Igor Neyman |
---|---|
Тема | Re: simple function index question |
Дата | |
Msg-id | A76B25F2823E954C9E45E32FA49D70ECCD68075F@mail.corp.perceptron.com обсуждение исходный текст |
Ответ на | Re: simple function index question ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: simple function index question
|
Список | pgsql-sql |
Interestingly a version of this:
CREATE INDEX TX_QSET_DIR_MAP_PRI_URI_TYP_UK
ON tx_question_set_dir_map
USING btree
(question_set2tx_question_set ,uri_type,
(CASE WHEN uri_type = 201900 THEN null::varchar(100)
ELSE question_set_dir_map_key END);
Worked for me. Try it if you are still interested.
Just do proper casting of null (it was varchar(100) in my case).
This is a multi-column index - with the third column being an expression - as opposed to a single-column index of a composite.
David J.
________________________________________________________________________________
You are right.
But the question is whether OP needs a single_column_index_of_a_composite or multi_column_index will do.
Regards,
Igor Neyman
В списке pgsql-sql по дате отправления: