indexes on primary and foreign keys
От
Burak Seydioglu
Тема
indexes on primary and foreign keys
Дата
Msg-id
1b8a973c0601111438m3e0b1cc0hf9c387a4a1d6791d@mail.gmail.com
Список
Дерево обсуждения
indexes on primary and foreign keys Burak Seydioglu <buraks78@gmail.com>
Re: indexes on primary and foreign keys Michael Fuhr <mike@fuhr.org>
Re: indexes on primary and foreign keys Burak Seydioglu <buraks78@gmail.com>
Re: indexes on primary and foreign keys K C Lau <kclau60@netvigator.com>
Re: indexes on primary and foreign keys Michael Glaesemann <grzm@myrealbox.com>
Re: indexes on primary and foreign keys Michael Fuhr <mike@fuhr.org>
Re: indexes on primary and foreign keys K C Lau <kclau60@netvigator.com>
Re: indexes on primary and foreign keys Tom Lane <tgl@sss.pgh.pa.us>
Re: indexes on primary and foreign keys Tom Lane <tgl@sss.pgh.pa.us>
I do a load of sql joins using primary and foreign keys. What i would like to know if PostgreSQL creates indexes on these columns automatically (in addition to using them to maintain referential integrity) or do I have to create an index manually on these columns as indicated below?
CREATE TABLE cities (
city_id integer primary key,
city_name varchar(50)
);
CREATE INDEX city_id_index ON cities(city_id);
Thanks for any insight.
Burak
В списке pgsql-performance по дате отправления