QUERY PLAN
Sort (cost=94.24..94.24 rows=1 width=99)
Sort Key: pt.id
-> Nested Loop Left Join (cost=0.44..94.23 rows=1 width=99)
-> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships pt (cost=0.29..86.01 rows=1 width=51)
Index Cond: ((object_id = ANY ('{39,42,41,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22}'::integer[])) AND (term_id = 20))
Filter: (object_type = 14)
-> Index Scan using tbl_term_taxonomies_pkey on tbl_term_taxonomies tt (cost=0.15..8.17 rows=1 width=22)
Index Cond: (pt.taxonomy_id = id)