Re: Question about indexes

From: Dawid Kuroczko <qnex42(at)gmail(dot)com>
To: Pgsql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about indexes
Date: 2004-11-15 10:53:26
Message-ID: 758d5e7f041115025358bec772@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 15 Nov 2004 11:38:29 +0100, Stefano Bonnin
<stefano(dot)bonnin(at)comai(dot)to> wrote:
>
> Only a simple question
>
> I have a table with
>
> primarykey(field1,field2,field3)
>
> and I want to execure a query like
>
> select * from my_table where field1 = some_value
>
> if I define an index on field1, I increase the query performace or not?

You increase it a bit. Anyway its not worth the hassle, as increase is
rather marginal, and having two indexes lessens the chance that
they'll be served from cache.

If you're not sure yet, just make some tests. :)

Regards,
Dawid

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daron 2004-11-15 11:57:10 Re: Visual Studio and Postgresql
Previous Message Stefano Bonnin 2004-11-15 10:38:29 Question about indexes