Skip site navigation (1) Skip section navigation (2)

Re: Is a better way to have the same result of this

From: Vernon Wu <vernonw(at)gatewaytech(dot)com>
To: Tomasz Myrta <jasiek(at)klaster(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Is a better way to have the same result of this
Date: 2002-12-05 20:58:13
Message-ID: 5A6KF0NHNMGEJG7XRYWL1X8X8.3defbde5@kimiko (view raw or flat)
Thread:
Lists: pgsql-performance
Tomasz,

I am under the impression that a primary key field is automically as a unique index. It seems to be correct after I verify it 
with the page http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=c13329%2ehtm#CREATINGANINDEX

Thanks for bringing up the question.

Vernon

12/5/2002 12:35:36 PM, Tomasz Myrta <jasiek(at)klaster(dot)net> wrote:

>Vernon Wu wrote:
>
>> The personid is a foreign key in the block table, and the the userid 
>> is the key of the profile table. So, both are indexed
>> by nature (if I don't make a mistake).
>
>What kind of nature? Did you create indexes for these fields? Postgres 
>doesn't create indexes by itself - even if field is a primary key. You 
>have to do it on your own. I think also, that Postgres doesn't use index 
>for tables having less then 200 rows - sequence scan is faster.
>Regards,
>Tomasz Myrta
>
>
>




Responses

pgsql-performance by date

Next:From: Jean-Luc LachanceDate: 2002-12-05 21:04:28
Subject: Re: Is a better way to have the same result of this
Previous:From: Rajesh Kumar Mallah.Date: 2002-12-05 20:41:27
Subject: Filesystem optimisation for postgresql tables and WAL logs on linux.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group