QUERY PLAN
Sort (cost=152.25..152.26 rows=1 width=267)
Sort Key: pt.id
-> Hash Right Join (cost=145.75..152.24 rows=1 width=267)
Hash Cond: (tt.id = pt.taxonomy_id)
-> Seq Scan on tbl_term_taxonomies tt (cost=0.00..5.53 rows=253 width=97)
-> Hash (cost=145.74..145.74 rows=1 width=111)
-> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships pt (cost=0.29..145.74 rows=1 width=111)
Index Cond: ((object_id = ANY ('{3826,3824,3804,3799,3794,3798,3786,3675,3644,3624,3622,3590,3586,3587,3551,3684,3534,3532,3523,3518}'::integer[])) AND (term_id = 18))
Filter: (object_type = 8)