Search Postgresql Archives

Re: Deleting vs foreign keys

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

 



On 10/25/05, Martijn van Oosterhout <kleptog@xxxxxxxxx> wrote:
> BTW, have you considered TRUNCATE? (although it may not work with
> foreign keys).

It doesn't :)

"TRUNCATE cannot be used if there are foreign-key references to the
table from other tables. Checking validity in such cases would require
table scans, and the whole point is not to do one."

Besides, emptying entire tables never happens, there's just selective
deletes from the "master" table.

Thanks for the tip, guys. I'll go punch in some indexes and I'll be
back to report how much of a difference it made.

---------------------------(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