BEGIN;

    DROP INDEX IF EXISTS transfer_log_find_existing;
    CREATE INDEX transfer_log_find_existing ON transfer_log(
        filename,
        origin_hostid,
        destination_hostid,
        rulename,
        origin_transfer_id,
        destination_transfer_id
    );


    DROP INDEX IF EXISTS flow_log_find_existing;
    CREATE INDEX flow_log_find_existing ON flow_log (
        flowname, filename
    );

COMMIT;
