sped things up with ANALYZE after creating indices in inventory tool