Re: Problem (bug?) with like
От | bombadil@wanadoo.es |
---|---|
Тема | Re: Problem (bug?) with like |
Дата | |
Msg-id | 20011203193033.A480@lorien.net обсуждение исходный текст |
Ответ на | Re: Problem (bug?) with like (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
El lunes 03 de diciembre, Tom Lane escribió: > > Here are my queries: > > You sure you didn't paste in the same result for #2 and #3? They're > the same plan with the same rows estimates --- but I'd expect the rows > estimates, at least, to change given the more-selective LIKE pattern. I don't know for sure if I have send wrong data, but I think not. Tomorrow I'll get more info. > Also, how many rows are there really that match '%DA%' and '%DAVID%'? Very few for that incredible difference in time: '%DA%' -> 2 sec. '%DAVID%' -> 3 min. > I suspect the planner is being overoptimistic about the selectivity of > '%DAVID%', and is choosing a plan that doesn't work well when there are > lots of DAVIDs :-( I have thought that it only occurs when item to find is present completely in any number of registers, but this is only a burde hypothesis :? Thanks for all. David
В списке pgsql-general по дате отправления: