Added index to AttributeSetKeys.asID for where clause + order by on the displayOrder, and also for potential join to the AttributeSets table