Re: Using Indices
От | ADBAAMD |
---|---|
Тема | Re: Using Indices |
Дата | |
Msg-id | 3AC75A43.2060903@bell.ca обсуждение исходный текст |
Ответ на | Using Indices (Alexander Lohse <al@humantouch.de>) |
Список | 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@bell.ca / \ http://terravista.pt./Enseada/1989/ mailto:leandrod@amdocs.com
В списке pgsql-general по дате отправления: