explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gsbE

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 20,985.248 ↓ 0.0 0 1

WindowAgg (cost=97.33..97.76 rows=1 width=1,088) (actual time=20,985.248..20,985.248 rows=0 loops=1)

2. 0.007 20,985.246 ↓ 0.0 0 1

Sort (cost=97.33..97.34 rows=1 width=778) (actual time=20,985.246..20,985.246 rows=0 loops=1)

  • Sort Key: snapshot_inquiry_control.project_id, (_st_distance(location.geo_point, '0101000020E6100000000000B865B142408E02B8EF3FE84B40'::geography, '0'::double precision, true))
  • Sort Method: quicksort Memory: 25kB
3. 0.001 20,985.239 ↓ 0.0 0 1

Nested Loop (cost=26.83..97.32 rows=1 width=778) (actual time=20,985.239..20,985.239 rows=0 loops=1)

4. 0.000 20,985.238 ↓ 0.0 0 1

Nested Loop (cost=26.40..88.63 rows=1 width=649) (actual time=20,985.238..20,985.238 rows=0 loops=1)

5. 0.000 20,985.238 ↓ 0.0 0 1

Nested Loop (cost=26.26..80.11 rows=1 width=584) (actual time=20,985.238..20,985.238 rows=0 loops=1)

6. 0.001 20,985.238 ↓ 0.0 0 1

Nested Loop (cost=25.84..71.68 rows=1 width=484) (actual time=20,985.238..20,985.238 rows=0 loops=1)

7. 0.000 20,985.237 ↓ 0.0 0 1

Nested Loop (cost=25.42..63.24 rows=1 width=355) (actual time=20,985.237..20,985.237 rows=0 loops=1)

8. 0.000 20,985.237 ↓ 0.0 0 1

Nested Loop (cost=25.15..54.91 rows=1 width=191) (actual time=20,985.237..20,985.237 rows=0 loops=1)

9. 0.001 20,985.237 ↓ 0.0 0 1

Nested Loop (cost=24.86..46.60 rows=1 width=145) (actual time=20,985.237..20,985.237 rows=0 loops=1)

  • Join Filter: (snapshot_inquiry_control.overdue_id = overdue.id)
10. 0.000 20,985.236 ↓ 0.0 0 1

Nested Loop (cost=24.86..45.53 rows=1 width=113) (actual time=20,985.236..20,985.236 rows=0 loops=1)

11. 324.607 20,985.236 ↓ 0.0 0 1

Nested Loop (cost=24.44..37.10 rows=1 width=100) (actual time=20,985.236..20,985.236 rows=0 loops=1)

12. 1,012.549 1,012.549 ↓ 272,890.0 272,890 1

Index Scan using location_gix on location (cost=0.29..8.68 rows=1 width=36) (actual time=0.274..1,012.549 rows=272,890 loops=1)

  • Index Cond: (geo_point && '0101000020E6100000000000B865B142408E02B8EF3FE84B40'::geography)
  • Filter: (('0101000020E6100000000000B865B142408E02B8EF3FE84B40'::geography && _st_expand(geo_point, '50000'::double precision)) AND _st_dwithin(geo_point, '0101000020E6100000000000B865B142408E02B8EF3FE84B40'::geography, '50000'::double precision, true))
  • Rows Removed by Filter: 91,475
13. 272.890 19,648.080 ↓ 0.0 0 272,890

Bitmap Heap Scan on snapshot_inquiry_control (cost=24.16..28.41 rows=1 width=72) (actual time=0.072..0.072 rows=0 loops=272,890)

  • Recheck Cond: ((actor_id = '-1'::integer) AND (location_id = location.id))
  • Filter: ((actuality = 0) AND (visible_id = 1) AND (project_id = ANY ('{95455,95456,95457,95458,95459,95460,95461,95462,95463,95464,96187,96188,96189,96190,96191,96192,96193,96194,96195,96196,96197,96198,96199,96200,96201,96202,96203,97087,97088,97089,97090,97091,97092,97093,97094,97095,97096,97097,97098,97100,97101,97102,97103,97987,97988,97989,97990,97991,97992,97993,97994,97995,97996,97997,97998,98000,98001,98002,98003,95454,97099,235987,98885,98886,98887,98888,98889,98890,98891,98892,98893,98894,98905,98906,98907,98908,98909,98910,98911,98912,98913,98914,98925,98926,98927,98928,98929,98930,98931,98932,98933,98934,316969,317077,317328,317223,95453,158440,158493,158546,97999,319128,319129,319130,319131,319132,319133,319134,319135,319136,319137,319138,319139,319140,319141,319142,319143,319144,319145,319146,319147,319148,319149,319150,319151,319152,319153,319154,319155,319156,319157,319158,319159,319160,319161,319162,319163,319164,319165,319166,319167,319168,319169,319170,319171,319172,319173,319174,319175,319176,319177,319178,319179,319180,319181,319182,319183,319184,319185,319186,319187,319188,319189,319190,319191,319192,319193,319194,319195,319196,319197,319198,319199,319200,319201,319202,319203,319204,319205,319206,319207,319208,319209,319210,319211}'::integer[])))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=489
14. 3,820.460 19,375.190 ↓ 0.0 0 272,890

BitmapAnd (cost=24.16..24.16 rows=1 width=0) (actual time=0.071..0.071 rows=0 loops=272,890)

15. 15,281.840 15,281.840 ↓ 3.1 645 272,890

Bitmap Index Scan on index_snapshot_inquiry_control_on_actor_id (cost=0.00..9.96 rows=205 width=0) (actual time=0.056..0.056 rows=645 loops=272,890)

  • Index Cond: (actor_id = '-1'::integer)
16. 272.890 272.890 ↑ 101.5 2 272,890

Bitmap Index Scan on index_snapshot_inquiry_control_on_location_id (cost=0.00..13.95 rows=203 width=0) (actual time=0.001..0.001 rows=2 loops=272,890)

  • Index Cond: (location_id = location.id)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using inquire_pkey on inquire (cost=0.42..8.44 rows=1 width=17) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.inquiry_id)
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on overdue (cost=0.00..1.03 rows=3 width=36) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using company_pkey on company (cost=0.29..8.30 rows=1 width=50) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.company_id)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using inquiry_subcategory_pkey on inquiry_subcategory (cost=0.27..8.29 rows=1 width=168) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.inquiry_subcategory_id)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using control_subject_pkey on control_subject (cost=0.42..8.44 rows=1 width=133) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.control_subject_id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using place_pkey on place (cost=0.42..8.44 rows=1 width=108) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.place_id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using stage_pkey on stage (cost=0.14..8.17 rows=1 width=73) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.stage_id)
  • Filter: ((kind = 0) AND (status_stage_id = 2) AND ((platform)::text = 'mb'::text))
24. 0.000 0.000 ↓ 0.0 0

Index Scan using execution_pkey on execution (cost=0.43..8.45 rows=1 width=125) (never executed)

  • Index Cond: (id = snapshot_inquiry_control.execution_id)
Planning time : 6.663 ms
Execution time : 20,985.524 ms