better performance when working with attributes

avoid fetching attribute types when importing a bunch of rows and don't create unnecessary select queries when adding new attribute values