Introduce indexes on id lookups