QUERY PLAN
HashAggregate (cost=1639.95..1666.44 rows=2649 width=24)
Group Key: dt1.taxonomy_id, t1.name
-> Hash Left Join (cost=297.93..1620.09 rows=2649 width=20)
Hash Cond: (dt1.taxonomy_id = t1.id)
-> Hash Right Join (cost=287.02..1602.12 rows=2649 width=8)
Hash Cond: (dt1.object_id = r.id)
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1308.03 rows=2698 width=8)
Filter: (term_id = 17)
-> Hash (cost=253.91..253.91 rows=2649 width=12)
-> Seq Scan on tbl_approves r (cost=0.00..253.91 rows=2649 width=12)
Filter: ((status <> 0) AND (created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5446,5461,5476,5499,5500}'::integer[])))
-> Hash (cost=7.07..7.07 rows=307 width=16)
-> Seq Scan on tbl_term_taxonomies t1 (cost=0.00..7.07 rows=307 width=16)