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
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?
- [PERFORM] indexes on primary and foreign keys Burak Seydioglu
- Re: [PERFORM] indexes on primary and foreign keys Tom Lane
- Re: [PERFORM] indexes on primary and foreign keys Michael Fuhr
- Re: [PERFORM] indexes on primary and foreign k... Burak Seydioglu
- Re: [PERFORM] indexes on primary and foreign k... K C Lau
- Re: [PERFORM] indexes on primary and forei... Michael Glaesemann
- Re: [PERFORM] indexes on primary and f... Michael Fuhr
- Re: [PERFORM] indexes on primary and f... K C Lau
- Re: [PERFORM] indexes on primary ... Tom Lane