QUERY PLAN
Sort (cost=94.68..94.69 rows=2 width=96)
Sort Key: pt.id
-> Hash Right Join (cost=86.57..94.67 rows=2 width=96)
Hash Cond: (tt.id = pt.taxonomy_id)
-> Seq Scan on tbl_term_taxonomies tt (cost=0.00..6.72 rows=272 width=19)
-> Hash (cost=86.55..86.55 rows=2 width=51)
-> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships pt (cost=0.29..86.55 rows=2 width=51)
Index Cond: ((object_id = ANY ('{7,6,5,7349,7348}'::integer[])) AND (term_id = 18))
Filter: (object_type = 11)