Re: How to use full-text search URL parser to filter query results bydomain name?
От | Michel Pelletier |
---|---|
Тема | Re: How to use full-text search URL parser to filter query results bydomain name? |
Дата | |
Msg-id | CACxu=vKr-1TNxmQrGx0uw=baJior2-nr7-X-bNN8VTDyLMGtfg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: How to use full-text search URL parser to filter query results bydomain name? (Jess Wren <jess.wren@interference.cc>) |
Список | pgsql-general |
On Wed, Apr 10, 2019 at 1:58 AM Jess Wren <jess.wren@interference.cc> wrote:
-> Parallel Seq Scan on links (cost=0.00..4554.40 rows=75740 width=112)-> Function Scan on ts_parse (cost=0.00..12.50 rows=5 width=32) Filter: (tokid = 6) (23 rows)I am wondering if there is a more efficient way to do things? Some people on IRC mentioned that it might be better to declare a scalar function to return the host from ts_parse instead of the LATERAL query ... but I couldn't figure out how to do that, or if it was even preferable to the above from a performance standpoint ... any ideas on how I could improve the above.
May try indexing the parsed expression to avoid the seq scan on links, something like:
create index on links (ts_parse('default', target));
and then run the explain (or explain analyze) to see if that improves things. Certainly as the links table gets bigger this should help.
В списке pgsql-general по дате отправления: