Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: redundants ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 8 Topic 15974 of 17437
Post > Topic >>

Re: redundants indexes can be created

by scetbon@[EMAIL PROTECTED] (Cyril SCETBON) Jul 4, 2008 at 12:09 PM

hubert depesz lubaczewski wrote:
> On Fri, Jul 04, 2008 at 11:54:37AM +0200, Cyril SCETBON wrote:
>   
>> Why postgres does not disallow creating redundants indexes ? Is it the
>> same behaviour in postgresql 8.3 ?
>>     
>
> Why should it? Redundant indexes are not "bugs". And can be very useful
> sometimes (thing concurrent reindexing).
>   
in this case your right, but lot of people are confused with primary key 
and unique key. So they create a unique key on the same column that 
constitute the primary key.  For example, Oracle inhib it :

SQL> create table toto(id int primary key);

Table created.

SQL> create unique index idx_toto_id on toto(id);
create unique index idx_toto_id on toto(id)
                                        *
ERROR at line 1:
ORA-01408: such column list already indexed

concurrent reindexing is the matter of postgresql, it should create it 
transparently when needed. And if I take into account the concurrent 
reindexing, why permitting more than 2 index on the same column ?

-- 
Cyril SCETBON

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 8 Posts in Topic:
redundants indexes can be created
scetbon@[EMAIL PROTECTED]  2008-07-04 11:54:37 
Re: redundants indexes can be created
depesz@[EMAIL PROTECTED]   2008-07-04 12:02:58 
Re: redundants indexes can be created
scetbon@[EMAIL PROTECTED]  2008-07-04 12:09:35 
Re: redundants indexes can be created
dev@[EMAIL PROTECTED] (R  2008-07-04 11:04:17 
Re: redundants indexes can be created
scetbon@[EMAIL PROTECTED]  2008-07-04 12:13:21 
Re: redundants indexes can be created
dev@[EMAIL PROTECTED] (R  2008-07-04 11:26:31 
Re: redundants indexes can be created
mailings@[EMAIL PROTECTED  2008-07-04 15:33:41 
Re: redundants indexes can be created
scetbon@[EMAIL PROTECTED]  2008-07-04 15:57:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:53:46 CST 2008.