Re: [GENERAL] 50 MB Table

From: Marten Feldtmann <marten(at)feki(dot)toppoint(dot)de>
To: JB <jimbag(at)kw(dot)igs(dot)net>
Cc: Paul Condon <pecondon(at)quiknet(dot)com>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] 50 MB Table
Date: 2000-03-07 18:58:58
Message-ID: 200003071858.TAA25711@feki.toppoint.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message kaiq 2000-03-07 18:59:53 Re: [GENERAL] Accounting/inventory systems
Previous Message Raigo Lukk 2000-03-07 18:04:27 Re: Trigger