Re: wildcard makes seq scan on prod db but not in test - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: wildcard makes seq scan on prod db but not in test
Date
Msg-id 4DC7F2B3020000250003D424@gw.wicourts.gov
Whole thread Raw
In response to wildcard makes seq scan on prod db but not in test  (Marcus Engene <mengpg2@engene.se>)
Responses Re: wildcard makes seq scan on prod db but not in test
List pgsql-performance
Marcus Engene <mengpg2@engene.se> wrote:

> I have a table with a few million rows and this index:
> CREATE INDEX bond_item_common_x7 ON bond_item_common
> ((lower(original_filename)));

> Dropping the wildcard for the like, both databases uses the index.
>
> Is there a way to convince Postgres to try not to do full table
> scan as much?

That could be a difference is collations.  What do you get from the
query on this page for each database?:

http://wiki.postgresql.org/wiki/Server_Configuration

-Kevin

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: wildcard makes seq scan on prod db but not in test
Next
From: Marcus Engene
Date:
Subject: Re: wildcard makes seq scan on prod db but not in test