Re: Problem (bug?) with like - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem (bug?) with like
Date
Msg-id 20011203193123.B480@lorien.net
Whole thread Raw
In response to Re: Problem (bug?) with like  (bombadil@wanadoo.es)
Responses Re: Problem (bug?) with like
List pgsql-general
bombadil@wanadoo.es writes:
>  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.

Also, how many rows are there really that match '%DA%' and '%DAVID%'?

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 :-(

            regards, tom lane


pgsql-general by date:

Previous
From: bombadil@wanadoo.es
Date:
Subject: Re: Problem (bug?) with like
Next
From: "Matthew Reath"
Date:
Subject: Scalable psql clusters