QUERY PLAN
HashAggregate (cost=4024.59..4090.84 rows=5300 width=55)
Group Key: dt1.taxonomy_id, t1.name
-> Hash Left Join (cost=2755.83..3971.59 rows=5300 width=24)
Hash Cond: (dt1.taxonomy_id = t1.id)
-> Hash Right Join (cost=2744.20..3945.87 rows=5300 width=13)
Hash Cond: (dt2.object_id = r.id)
-> Seq Scan on tbl_term_taxonomy_relationships dt2 (cost=0.00..1190.81 rows=1012 width=8)
Filter: ((term_id = 18) AND (object_type = 7))
-> Hash (cost=2677.95..2677.95 rows=5300 width=13)
-> Hash Right Join (cost=1600.25..2677.95 rows=5300 width=13)
Hash Cond: (dt1.object_id = r.id)
-> Seq Scan on tbl_term_taxonomy_relationships dt1 (cost=0.00..1058.18 rows=7436 width=8)
Filter: (term_id = 15)
-> Hash (cost=1534.00..1534.00 rows=5300 width=17)
-> Seq Scan on tbl_reimbursements r (cost=0.00..1534.00 rows=5300 width=17)
Filter: ((status <> 0) AND (created_by = ANY ('{1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1025,1026,1027,1028,1029,1030,5015,5016,5022,5023,5024,5025,5026,5027,5028,5029,5030,5031,5032,5033,5037,5043,5044,5045,5047,5048,5049,5050,5062,5063,5064,5065,5066,5069,5070,5071,5072,5073,5074,5075,5076,5078,5079,5080,5081,5082,5083,5085,5086,5087,5088,5089,5093,5094,5095,5096,5101,5102,5104,5105,5123,5124,5125,5126,5128,5135,5203,5208,5209,5229,5230,5247,5248,5249,5250,5252,5258,5259,5293,5294,5295,5296,5297,5298,5299,5300,5301,5302,5303,5304,5305,5309,5311,5329,5332,5333,5351,5356,5357,5358,5359,5360,5364,5388,5393,5404,5409,5411,5412,5413,5419,5420,5440,5445,5446,5448,5449}'::integer[])))
-> Hash (cost=7.39..7.39 rows=339 width=15)
-> Seq Scan on tbl_term_taxonomies t1 (cost=0.00..7.39 rows=339 width=15)