DROP INDEX IF EXISTS addresstype ON adresses;
DROP INDEX IF EXISTS globalaclgrp ON adresses;

CREATE INDEX IF NOT EXISTS dlb_perf_1 ON adresses (addresstype, creaid, responsibleid, birthday);
CREATE INDEX IF NOT EXISTS dlb_perf_1_acl ON adresses (globalaclgrp, addresstype, creaid, responsibleid, birthday);

CREATE INDEX IF NOT EXISTS dlb_covering_2 ON adrpro_contactpersontypes (id, descr, reccolorbackground, reccolortext);

CREATE INDEX IF NOT EXISTS dlb_perf_2 ON adresses (laststatupdate, addresstype, cantonid, regionid);

DROP INDEX IF EXISTS ptypeid ON persons;
CREATE INDEX IF NOT EXISTS dlb_perf_3 ON persons (ptypeid, adressid);
