Re: How to speed up product code and subcode match

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to speed up product code and subcode match
Дата
Msg-id 21737d42-c902-92f1-2f95-8013abca1531@hot.ee
обсуждение исходный текст
Ответ на Re: How to speed up product code and subcode match  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How to speed up product code and subcode match
Список pgsql-general

Hi!

Separate
the product code and size into two columns --- if there's somebody
who really wants to see them in the above format, give them a
view or generated column.  Then instead of the impossible-to-optimize
queries you showed, you could do something like

select toode.toode , n2, n3, n4
from toode, vordlusajuhinnak
where toode.toode = vordlusajuhinnak.toode;

Can function index

create index on toode ( split_part( toode, '/',1) )

and query

select toode.toode , n2, n3, n4

from toode, vordlusajuhinnak

where split_part( toode.toode, '/',1) = vordlusajuhinnak.toode;
used and keeping existing table structure? Functional index should produce same speed improvement as using separate column?

Andrus.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to speed up product code and subcode match
Следующее
От: Jeff Ross
Дата:
Сообщение: Re: 15 pg_upgrade with -j