Search Postgresql Archives

Re: Question about indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Nov 2004 11:38:29 +0100, Stefano Bonnin
<stefano.bonnin@xxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux