QUERY PLAN
Sort (cost=79.62..79.63 rows=1 width=96)
Sort Key: pt.id
-> Nested Loop Left Join (cost=0.44..79.61 rows=1 width=96)
-> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships pt (cost=0.29..71.39 rows=1 width=51)
Index Cond: ((object_id = ANY ('{4079,4077,4072,2364,2216,2198,2114}'::integer[])) AND (term_id = 18))
Filter: (object_type = 8)
-> Index Scan using tbl_term_taxonomies_pkey on tbl_term_taxonomies tt (cost=0.15..8.17 rows=1 width=19)
Index Cond: (pt.taxonomy_id = id)