Re: [GENERAL] 50 MB Table - Mailing list pgsql-general

From Marten Feldtmann
Subject Re: [GENERAL] 50 MB Table
Date
Msg-id 200003071858.TAA25711@feki.toppoint.de
Whole thread Raw
In response to Re: [GENERAL] 50 MB Table  (JB <jimbag@kw.igs.net>)
List pgsql-general
> CREATE INDEX nx_info1 ON info (lastname);
> CREATE INDEX nx_info2 ON info (street_name);
>
> The select is as simple as this in most cases...
>
> SELECT * FROM info WHERE street_name LIKE 'MAIN%';
>
> .,,the table about 50MB worth, about 70,000 records. I have an index on
> 'lastname' and 'street_name' and I need to search on each of these with
> 'LIKE'. So I was wondering about ways to speed this up. It's very slow.
> It takes about 20 seconds for the above query. I even uppercased all the

 I think, that psql can not use any indicces when doing queries like
this. The indices would work if you would compare with "=".

 Actually I even do not even know, how one culd create a simple index
helping for searches like this.

 Marten





pgsql-general by date:

Previous
From:
Date:
Subject: Re: [GENERAL] Accounting/inventory systems
Next
From: JB
Date:
Subject: Re: [GENERAL] 50 MB Table