explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fZXE

Settings
# exclusive inclusive rows x rows loops node
1. 0.609 7.709 ↑ 5.8 200 1

GroupAggregate (cost=10,856.33..10,907.03 rows=1,158 width=40) (actual time=7.063..7.709 rows=200 loops=1)

  • Group Key: act_item.rests_item_id
2. 0.341 7.100 ↑ 1.1 1,009 1

Sort (cost=10,856.33..10,859.23 rows=1,159 width=1,083) (actual time=7.049..7.100 rows=1,009 loops=1)

  • Sort Key: act_item.rests_item_id
  • Sort Method: quicksort Memory: 166kB
3. 0.238 6.759 ↑ 1.1 1,009 1

Hash Left Join (cost=4.04..10,797.35 rows=1,159 width=1,083) (actual time=0.082..6.759 rows=1,009 loops=1)

  • Hash Cond: (egais_act.shop_act_status_id = shop_status.id)
4. 0.326 6.513 ↑ 1.1 1,009 1

Hash Left Join (cost=2.59..10,792.79 rows=1,159 width=575) (actual time=0.071..6.513 rows=1,009 loops=1)

  • Hash Cond: (egais_act.store_act_status_id = store_status.id)
5. 0.005 6.173 ↑ 1.1 1,009 1

Nested Loop (cost=1.14..10,787.67 rows=1,159 width=67) (actual time=0.052..6.173 rows=1,009 loops=1)

6. 0.985 4.150 ↑ 1.1 1,009 1

Nested Loop (cost=0.85..10,392.70 rows=1,159 width=59) (actual time=0.046..4.150 rows=1,009 loops=1)

7. 1.147 1.147 ↑ 1.1 1,009 1

Index Scan using idx_egais_act_item_rests_item_id on egais_act_item act_item (cost=0.43..1,994.74 rows=1,159 width=27) (actual time=0.039..1.147 rows=1,009 loops=1)

  • Index Cond: (rests_item_id = ANY ('{2543139,2742828,1994776,1595401,2746942,2344962,2495492,1318972,2754560,2445332,1599018,2755096,2416145,2354709,2441235,2145816,1554477,2145818,2145819,1318952,2755095,2235491,2518628,2628202,2628203,1707100,2653793,2682466,2681976,2717822,2511484,2511485,2511483,2705481,2705480,2705482,2753103,2705477,2705476,2705479,2705478,1576556,2339419,2753104,1380500,1633945,1598618,2375335,1633948,2447009,1598623,2447010,1618568,1654923,1654922,1783436,1708677,2725513,2091193,2412674,2303620,2286738,2238096,1999530,2238102,1686703,2238100,2238101,2419859,2286744,2445982,2655380,2644629,2644630,2327783,2222312,2710240,2222315,2720483,2222314,2720482,2302701,2222318,2512626,2715378,1521865,1692871,1521864,2320067,2320066,2320065,2320071,2320070,2320075,2320074,2320073,2738883,2320079,2320078,2320077,2320076,2174160,2354385,1612011,2730717,2730719,2509521,2162908,2591449,2162910,2710230,2500900,2500901,1612572,2500899,2543404,2712888,2700593,2498879,2700592,2351367,2580239,2580238,2351368,2580234,2499849,2546462,1608997,2202983,2202982,2339691,2339695,2421096,2339699,2483573,2339698,2483572,2339696,2339702,2483571,1650499,1650501,1650503,2519928,2259266,1794410,2506580,2198354,2506581,2506578,2198356,2506579,1605985,2582875,2710869,2472792,1664411,2460071,2327968,1664413,2648505,1620875,2006408,2112385,2323329,2459015,2297230,1645992,1645996,2614686,2614685,2141084,1318826,2141086,2341349,1792979,1631698,1631699,2384361,2591720,2580471,2384375,2388977,2069443,2300927,2411460,1428983,2400710,2476993,2528706,2411457,2411458,2411459,2520012,2551756,2411465,2318285,1730037,1660911,2246110}'::bigint[]))
8. 2.018 2.018 ↑ 1.0 1 1,009

Index Scan using egais_act_pkey on egais_act (cost=0.42..7.25 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=1,009)

  • Index Cond: (id = act_item.egais_act_id)
9. 2.018 2.018 ↑ 1.0 1 1,009

Index Scan using legal_person_pkey on legal_person lp (cost=0.29..0.34 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=1,009)

  • Index Cond: (id = egais_act.legal_person_id)
10. 0.005 0.014 ↓ 1.1 21 1

Hash (cost=1.20..1.20 rows=20 width=524) (actual time=0.014..0.014 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.009 0.009 ↓ 1.1 21 1

Seq Scan on egais_status store_status (cost=0.00..1.20 rows=20 width=524) (actual time=0.007..0.009 rows=21 loops=1)

12. 0.004 0.008 ↓ 1.1 21 1

Hash (cost=1.20..1.20 rows=20 width=524) (actual time=0.008..0.008 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.004 0.004 ↓ 1.1 21 1

Seq Scan on egais_status shop_status (cost=0.00..1.20 rows=20 width=524) (actual time=0.002..0.004 rows=21 loops=1)

Planning time : 1.717 ms
Execution time : 7.788 ms