Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sort (cost=5813.83..5814.56 ROWS=293 width=394) (actual TIME=874.721..875.611 ROWS=500 loops=1)
- Sort KEY: ((COALESCE(t2.sell_total, 0::NUMERIC) - COALESCE((SUM(u0.total_price)), 0::NUMERIC)))
- Sort Method: quicksort Memory: 140kB
- -> Hash JOIN (cost=5062.40..5801.82 ROWS=293 width=394) (actual TIME=636.779..868.810 ROWS=500 loops=1)
- Hash Cond: (ig.category_id = ic.id)
- -> Hash JOIN (cost=5060.68..5791.68 ROWS=293 width=252) (actual TIME=636.543..860.394 ROWS=500 loops=1)
- Hash Cond: (i.group_id = ig.id)
- -> MERGE JOIN (cost=5034.96..5761.93 ROWS=293 width=252) (actual TIME=622.351..841.994 ROWS=500 loops=1)
- MERGE Cond: (i.id = (COALESCE(u0.item_id, t2.item_id)))
- -> INDEX Scan USING thing_item_pkey ON thing_item i (cost=0.00..674.85 ROWS=19091 width=40) (actual TIME=0.102..175.132 ROWS=18635 loops=1)
- -> Sort (cost=5034.96..5035.69 ROWS=293 width=216) (actual TIME=622.099..623.388 ROWS=500 loops=1)
- Sort KEY: (COALESCE(u0.item_id, t2.item_id))
- Sort Method: quicksort Memory: 81kB
- -> MERGE FULL JOIN (cost=5018.11..5022.96 ROWS=293 width=216) (actual TIME=615.534..620.378 ROWS=500 loops=1)
- MERGE Cond: (u0.item_id = t2.item_id)
- -> Sort (cost=2160.88..2161.31 ROWS=172 width=108) (actual TIME=233.715..234.599 ROWS=475 loops=1)
- Sort KEY: u0.item_id
- Sort Method: quicksort Memory: 50kB
- -> HashAggregate (cost=2149.34..2152.78 ROWS=172 width=28) (actual TIME=230.936..232.371 ROWS=475 loops=1)
- -> Bitmap Heap Scan ON thing_transaction u0 (cost=467.23..1866.39 ROWS=22636 width=28) (actual TIME=11.662..129.660 ROWS=21573 loops=1)
- Recheck Cond: ((t_type)::text = 'B'::text)
- FILTER: ((DATE >= '2010-09-09 07:30:00+09:30'::TIMESTAMP WITH TIME zone) AND (DATE <= '2011-09-09 07:30:00+09:30'::TIMESTAMP WITH TIME zone) AND (corporation_id = 751993277))
- -> Bitmap INDEX Scan ON thing_transaction_t_type (cost=0.00..461.57 ROWS=27908 width=0) (actual TIME=11.308..11.308 ROWS=27680 loops=1)
- INDEX Cond: ((t_type)::text = 'B'::text)
- -> Sort (cost=2857.23..2857.96 ROWS=293 width=108) (actual TIME=381.789..382.619 ROWS=463 loops=1)
- Sort KEY: t2.item_id
- Sort Method: quicksort Memory: 49kB
- -> Subquery Scan t2 (cost=2836.43..2845.22 ROWS=293 width=108) (actual TIME=377.099..380.402 ROWS=463 loops=1)
- -> HashAggregate (cost=2836.43..2842.29 ROWS=293 width=28) (actual TIME=377.091..378.771 ROWS=463 loops=1)
- -> Seq Scan ON thing_transaction u0 (cost=0.00..2352.92 ROWS=38681 width=28) (actual TIME=0.361..176.270 ROWS=39838 loops=1)
- FILTER: ((DATE >= '2010-09-09 07:30:00+09:30'::TIMESTAMP WITH TIME zone) AND (DATE <= '2011-09-09 07:30:00+09:30'::TIMESTAMP WITH TIME zone) AND (corporation_id = 751993277) AND ((t_type)::text = 'S'::text))
- -> Hash (cost=15.32..15.32 ROWS=832 width=8) (actual TIME=14.151..14.151 ROWS=832 loops=1)
- -> Seq Scan ON thing_itemgroup ig (cost=0.00..15.32 ROWS=832 width=8) (actual TIME=3.636..12.366 ROWS=832 loops=1)
- -> Hash (cost=1.32..1.32 ROWS=32 width=150) (actual TIME=0.179..0.179 ROWS=32 loops=1)
- -> Seq Scan ON thing_itemcategory ic (cost=0.00..1.32 ROWS=32 width=150) (actual TIME=0.022..0.089 ROWS=32 loops=1)
- Total runtime: 877.097 ms
- (36 ROWS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement