Re: Can we add syntax for references auto create index or not. - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Can we add syntax for references auto create index or not.
Date
Msg-id CAKFQuwatm5D-d2eo2ZkD49k2eg3bAnEs_C6vNuqmWnzfSOO5Qg@mail.gmail.com
Whole thread Raw
In response to Can we add syntax for references auto create index or not.  (digoal zhou <digoal.zhou@gmail.com>)
Responses Re: Can we add syntax for references auto create index or not.  (digoal zhou <digoal.zhou@gmail.com>)
List pgsql-hackers
On Tue, May 26, 2015 at 7:03 PM, digoal zhou <digoal.zhou@gmail.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.​

pgsql-hackers by date:

Previous
From: digoal zhou
Date:
Subject: Can we add syntax for references auto create index or not.
Next
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade resets timeline to 1