Re: ***SPAM*** Re: Help with large delete

2022-04-16 Thread Tom Lane
Perry Smith writes: > On Apr 16, 2022, at 10:33, Tom Lane wrote: >> The most obvious question is do you have an index on the referencing >> column. PG doesn't require one to exist to create an FK; but if you >> don't, deletes of referenced rows had better be uninteresting to you >> performance-w

Re: ***SPAM*** Re: Help with large delete

2022-04-16 Thread Perry Smith
> On Apr 16, 2022, at 10:33, Tom Lane wrote: > > Perry Smith writes: >> Currently I have one table that mimics a file system. Each entry has a >> parent_id and a base name where parent_id is an id in the table that must >> exist in the table or be null with cascade on delete. >> I’ve starte