explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Idnx

Settings
# exclusive inclusive rows x rows loops node
1. 0.756 9.496 ↑ 1.6 200 1

GroupAggregate (cost=6,687.17..6,707.42 rows=324 width=96) (actual time=8.689..9.496 rows=200 loops=1)

  • Group Key: rest.id, lp.rests_report_date, lp.rests_shop_report_date
2. 0.433 8.740 ↓ 3.1 1,009 1

Sort (cost=6,687.17..6,687.98 rows=324 width=1,091) (actual time=8.671..8.740 rows=1,009 loops=1)

  • Sort Key: rest.id, lp.rests_report_date, lp.rests_shop_report_date
  • Sort Method: quicksort Memory: 166kB
3. 0.450 8.307 ↓ 3.1 1,009 1

Nested Loop Left Join (cost=1.84..6,673.66 rows=324 width=1,091) (actual time=0.060..8.307 rows=1,009 loops=1)

4. 0.515 2.812 ↓ 3.1 1,009 1

Nested Loop Left Join (cost=1.15..5,606.28 rows=324 width=51) (actual time=0.050..2.812 rows=1,009 loops=1)

5. 0.082 1.097 ↑ 1.0 200 1

Nested Loop Left Join (cost=0.72..2,985.95 rows=200 width=32) (actual time=0.044..1.097 rows=200 loops=1)

6. 0.615 0.615 ↑ 1.0 200 1

Index Scan using rests_item_pkey on rests_item rest (cost=0.43..1,689.45 rows=200 width=16) (actual time=0.038..0.615 rows=200 loops=1)

  • Index Cond: (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[]))
7. 0.400 0.400 ↑ 1.0 1 200

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

  • Index Cond: (rest.legal_person_id = id)
8. 1.200 1.200 ↑ 1.2 5 200

Index Scan using idx_egais_act_item_rests_item_id on egais_act_item act_item (cost=0.43..13.04 rows=6 width=27) (actual time=0.003..0.006 rows=5 loops=200)

  • Index Cond: (rests_item_id = rest.id)
9. 1.009 5.045 ↑ 1.0 1 1,009

Nested Loop Left Join (cost=0.70..3.28 rows=1 width=1,056) (actual time=0.005..0.005 rows=1 loops=1,009)

10. 0.000 4.036 ↑ 1.0 1 1,009

Nested Loop Left Join (cost=0.56..3.13 rows=1 width=548) (actual time=0.004..0.004 rows=1 loops=1,009)

11. 3.027 3.027 ↑ 1.0 1 1,009

Index Scan using egais_act_pkey on egais_act act (cost=0.42..2.97 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=1,009)

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

Index Scan using egais_status_pkey on egais_status egais_status_act_store (cost=0.14..0.16 rows=1 width=524) (actual time=0.001..0.001 rows=1 loops=1,009)

  • Index Cond: (act.store_act_status_id = id)
13. 0.000 0.000 ↓ 0.0 0 1,009

Index Scan using egais_status_pkey on egais_status egais_status_act_shop (cost=0.14..0.16 rows=1 width=524) (actual time=0.000..0.000 rows=0 loops=1,009)

  • Index Cond: (act.shop_act_status_id = id)
Planning time : 1.379 ms
Execution time : 9.594 ms