Re: query very slow when enable_seqscan=on
От | Tom Lane |
---|---|
Тема | Re: query very slow when enable_seqscan=on |
Дата | |
Msg-id | 13853.1152021389@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: query very slow when enable_seqscan=on (Tomasz Ostrowski <tometzky@batory.org.pl>) |
Ответы |
Re: query very slow when enable_seqscan=on
|
Список | pgsql-bugs |
Tomasz Ostrowski <tometzky@batory.org.pl> writes: > I think because there is no good solution to this - no statistical > information is going to predict how much data will match a regular > expression. Well, it's certainly hard to imagine simple stats that would let the code guess that, say, "warsa" and "warsaw" match nearly the same (large) number of rows while "warsawq" matches nothing. I think the real problem here is that regex matching is the wrong tool for the job. Have you looked into a full-text index (tsearch2)? With something like that, the index operator has at least got the correct conceptual model, ie, looking for indexed words. I'm not sure if they have any decent statistical support for it :-( but in theory that seems doable, whereas regex estimation will always be a crapshoot. regards, tom lane
В списке pgsql-bugs по дате отправления: