Re: BUG #1325: like error - Mailing list pgsql-bugs

From Richard Huxton
Subject Re: BUG #1325: like error
Date
Msg-id 419C8E02.504@archonet.com
Whole thread Raw
In response to BUG #1325: like error  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
PostgreSQL Bugs List wrote:
> The following bug has been logged online:
>
> Bug reference:      1325
> Logged by:          gregory
> Email address:      gperuch@citer.fr
> PostgreSQL version: 8.0 Beta
> Operating system:   win2000
> Description:        like error

> after
> I copy 5 millions lignes on the table

> select * from tbinvoicerows
> where invoicecd like 'FLOCAA00000025%'
>
> result in 40 secondes with 2 records  BUG
> Bug : the result is good but I expect a result faster as the first select
> (like in mssql 7)

Almost certainly not a bug - you might be better subscribing to the
general/sql/performance mailing lists for this.

You want to:
1. VACUUM ANALYZE the table
2. Check your database was initialised with the "C" locale
3. Examine EXPLAIN ANALYZE to see how many rows the planner is expecting.

You can find plenty of discussion of all of these in the mailing list
archives. Also you might want to read the FAQ, particularly section 4.8
   http://www.postgresql.org/docs/faqs/FAQ.html
--
   Richard Huxton
   Archonet Ltd

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1325: like error
Next
From: Stephan Szabo
Date:
Subject: Re: BUG #1325: like error