Added indexes on m_audit_item(record_id) and m_audit_delta(record_id)
Added indexes on m_audit_item(record_id) and m_audit_delta(record_id)

PostgreSQL does not create automatic indexes on foreign key columns.
Delete from parent table is very slow because of full scan on the record_id columns of the child tables.
Pardus-Engerek/engerek,arnost-starosta/midpoint,arnost-starosta/midpoint,arnost-starosta/midpoint,arnost-starosta/midpoint,Pardus-Engerek/engerek,arnost-starosta/midpoint,Pardus-Engerek/engerek,Pardus-Engerek/engerek