Closed FuhuXia closed 1 year ago
Table harvest_error needs an index on column harvest_object_id. Without it it takes too long to delete a harvest_object.
harvest_error
harvest_object_id
BEGIN; EXPLAIN (analyze,buffers,timing) DELETE FROM harvest_object WHERE id='2dce01ff-5168-400b-9698-3643a8dc3369'; ROLLBACK;
Before adding the index:
... Trigger for constraint harvest_object_error_harvest_object_id_fkey: time=201.459 calls=1
After adding the index:
... Trigger for constraint harvest_object_error_harvest_object_id_fkey: time=0.362 calls=1
Table
harvest_error
needs an index on columnharvest_object_id
. Without it it takes too long to delete a harvest_object.Before adding the index:
After adding the index: