Search Postgresql Archives

Re: Deleting vs foreign keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/25/05, Michael Fuhr <mike@xxxxxxxx> wrote:
> Are there indexes on the foreign key columns?  That is, given
> the following example,
>
> CREATE TABLE foo (id integer PRIMARY KEY);
> CREATE TABLE bar (fooid integer NOT NULL REFERENCES foo ON DELETE CASCADE);
>
> do you have an index on bar.fooid?

There are no indexes on the referring fields in any tables. Would this
make a huge difference?

> Also, do you regularly vacuum and analyze the database?

Yes.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux