Re: wildcard makes seq scan on prod db but not in test

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Marcus Engene" <mengpg2(at)engene(dot)se>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: wildcard makes seq scan on prod db but not in test
Date: 2011-05-09 18:57:07
Message-ID: 4DC7F2B3020000250003D424@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Marcus Engene <mengpg2(at)engene(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Marcus Engene 2011-05-09 19:11:00 Re: wildcard makes seq scan on prod db but not in test
Previous Message Tom Lane 2011-05-09 18:48:36 Re: wildcard makes seq scan on prod db but not in test