Re: slow delete

2023-08-16 Thread Jeff Janes
On Tue, Aug 15, 2023 at 4:23 PM Les wrote: { > > "Trigger Name": "RI_ConstraintTrigger_a_75463", > > "Constraint Name": "fk_pfq_src_product_file", > > "Relation": "product_file", > > "Time": 11179.429, > > "Calls": 90 > > }, > ... > The one with fk_pfft_product looks like this, it has about 500

Re: slow delete

2023-08-15 Thread Les
Tom Lane ezt írta (időpont: 2023. aug. 15., K, 22:37): > Les writes: > > It seems that two foreign key constraints use 10.395 seconds out of the > > total 11.24 seconds. But I don't see why it takes that much? > > Probably because you don't have an index on the referencing column. > You can get

Re: slow delete

2023-08-15 Thread Tom Lane
Les writes: > It seems that two foreign key constraints use 10.395 seconds out of the > total 11.24 seconds. But I don't see why it takes that much? Probably because you don't have an index on the referencing column. You can get away with that, if you don't care about the speed of deletes from th