Re: Does PostgreSQL ever create indexes on its own?

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Jeremy Harris *EXTERN*'" <jgh(at)wizmail(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does PostgreSQL ever create indexes on its own?
Date: 2015-11-13 11:49:09
Message-ID: A737B7A37273E048B164557ADEF4A58B50FE3F5B@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremy Harris wrote:
> On 13/11/15 10:49, Thomas Kellerer wrote:
>>> These indexes were *not* created by PostgreSQL.
>>> We are not Oracle.
>>
>> Well, Oracle does not create indexes on its own either - it has the same strategy as Postgres:
>> Indexes are only created automatically for primary keys and unique constraints.

I know - but I couldn't help commenting on the strange names
it chooses for these, like "SYS43243247".
Sorry for being unclear.

> Given that indices are an implementation wart on the side of the
> relational model, it'd be nice if RDBMS' did create them for one.

That cannot be done without knowing what the queries are going to be.

However, I recently learned that MySQL automatically creates indexes
on columns with a foreign key, and you cannot even drop those.

Maybe that would be a good thing, guessing from the number of cases
where people suffer from the lack of such indexes, but on the other
hand it feels like too much DWIM (there are cases where you do not
need such an index).

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Keener 2015-11-13 13:00:45 Re:
Previous Message Jeremy Harris 2015-11-13 11:01:19 Re: Does PostgreSQL ever create indexes on its own?