Re: Using Indices

From: "ADBAAMD" <adba(dot)amdocs(at)bell(dot)ca>
To: "Alexander Lohse" <al(at)humantouch(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using Indices
Date: 2001-04-01 16:41:39
Message-ID: 3AC75A43.2060903@bell.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alexander Lohse wrote:

>
> when I use phpPgAdmin to create DBs, my Indices are getting automatic
> names like : pers_UID_key
>
> I am getting confused about the name!
>
> Does that mean a need to do call this in a select query?
>
> "select * from pers where pers_UID_key = '...'"
>
> or do i call the original field?
>
> "select * from pers where UID= '...'"

In relational databases you should not care much about indices when
writing simple queries. They are used automagically by the query
planner according to need. Many times the planner will do a better job
of improving performance than a common programmer. And if you decide to
change your indices, there's no need to rewrite your programs and queries.

I would recommend that anyone coming to relational databases read "An
Introduction to Database Systems", 7th Ed, by Chris J Date -
Addison-Wesley, October 1.999, ISBN 0201385902; around US$ 58 used, US$
72 new. The relational world is very, very different from "navigational
databases", and even if it is far simpler for the user it takes some
getting used to by programmers.

--
_
/ \ Leandro Guimarães Faria Corsetti Dutra +55 (11) 3040 8913
\ / Amdocs at Bell Canada +1 (514) 786 87 47
X Support Center, São Paulo, Brazil mailto:adbaamd(at)bell(dot)ca
/ \ http://terravista.pt./Enseada/1989/ mailto:leandrod(at)amdocs(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel ?erud 2001-04-01 16:43:05 Re: RE: Re: Dissapearing indexes, what's that all about?
Previous Message Mike Mascari 2001-04-01 16:40:19 RE: Re: Dissapearing indexes, what's that all about?