Re: Can we add syntax for references auto create index or not.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: digoal zhou <digoal(dot)zhou(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can we add syntax for references auto create index or not.
Date: 2015-05-27 17:41:27
Message-ID: CAKFQuwatm5D-d2eo2ZkD49k2eg3bAnEs_C6vNuqmWnzfSOO5Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 26, 2015 at 7:03 PM, digoal zhou <digoal(dot)zhou(at)gmail(dot)com> wrote:

> When we create table, some column use foreign key references.
> Now PostgreSQL don't create index for the FK, and there is no problem.
> But when some body need the index to speed up the query within these APP,
> they need to add the index manual one-by-one when has many tables.
> If we can add syntax for auto create index for FK by user's choose, and
> default not create?
>

​I presume you mean to modify the CREATE TABLE statement.​

​How does this help solve the problem "when some body need the index to
speed up the query"?

My first impression is that I like the idea. The fact that it is not
supported by the SQL standard is a drawback Do any other vendors do this?

David J.​

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-05-27 17:42:44 Re: pg_upgrade resets timeline to 1
Previous Message Andrew Dunstan 2015-05-27 16:54:45 Re: Triggers on transaction?