Re: Help with large delete

2022-04-17 Thread Perry Smith
Thank you TOM!!! So… I did: create index parent_id_index on dateien(parent_id); And now things are going much faster. As you can see, I had an index kinda sorta on the parent id but I guess the way I did it prevented Postgres from using it. > On Apr 17, 2022, at 06:58, Perry Smith wrote: >

Re: Help with large delete

2022-04-17 Thread Perry Smith
I’m sending this again. I don’t see that it made it to the list but there is also new info here. > On Apr 16, 2022, at 10:33, Tom Lane > wrote: > > Perry Smith mailto:p...@easesoftware.com>> writes: >> Currently I have one table that mimics a file system. Each entry

Re: Help with large delete

2022-04-16 Thread Perry Smith
> On Apr 16, 2022, at 13:56, Rob Sargent wrote: > > > >> On Apr 16, 2022, at 12:24 PM, Perry Smith wrote: >> >>  >> >>> On Apr 16, 2022, at 12:57, Jan Wieck >> > wrote: >>> >>> Make your connection immune to disconnects by using something like the >>> screen util

Re: Help with large delete

2022-04-16 Thread Rob Sargent
On Apr 16, 2022, at 12:24 PM, Perry Smith wrote:On Apr 16, 2022, at 12:57, Jan Wieck wrote:Make your connection immune to disconnects by using something like the screen utility.Exactly… I’m using emacs in a server (daemon) mode so it stays alive.  Then I do “shell” within it.I u

Re: Help with large delete

2022-04-16 Thread Perry Smith
> On Apr 16, 2022, at 12:57, Jan Wieck wrote: > > Make your connection immune to disconnects by using something like the screen > utility. Exactly… I’m using emacs in a server (daemon) mode so it stays alive. Then I do “shell” within it. > On Sat, Apr 16, 2022, 09:26 Perry Smith

Re: Help with large delete

2022-04-16 Thread Jan Wieck
Make your connection immune to disconnects by using something like the screen utility. Regards, Jan On Sat, Apr 16, 2022, 09:26 Perry Smith wrote: > 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 mu

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

Re: Help with large delete

2022-04-16 Thread Tom Lane
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 started a delete of a root entry with about 300,000 descendants

Re: Help with large delete

2022-04-16 Thread Peter J. Holzer
On 2022-04-16 08:25:56 -0500, Perry Smith wrote: > 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 started a delete of a root entry w

Re: Help with large delete

2022-04-16 Thread Rob Sargent
On 4/16/22 07:25, Perry Smith wrote: 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 started a delete of a root entry with about 300,000