explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LAub

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,615.956 ↑ 1.0 20 1

Limit (cost=655,190.86..655,193.25 rows=20 width=261) (actual time=1,615.936..1,615.956 rows=20 loops=1)

2. 52.315 1,661.020 ↑ 42,410.4 20 1

Gather Merge (cost=655,190.86..756,750.74 rows=848,208 width=261) (actual time=1,615.935..1,661.020 rows=20 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 68.342 1,608.705 ↑ 11,780.7 18 5 / 5

Sort (cost=654,190.80..654,720.93 rows=212,052 width=261) (actual time=1,608.701..1,608.705 rows=18 loops=5)

  • Sort Key: lesson_consume.id, lesson_consume.lesson_pk_id DESC
  • Sort Method: top-N heapsort Memory: 34kB
  • Worker 0: Sort Method: top-N heapsort Memory: 42kB
  • Worker 1: Sort Method: top-N heapsort Memory: 35kB
  • Worker 2: Sort Method: top-N heapsort Memory: 35kB
  • Worker 3: Sort Method: top-N heapsort Memory: 35kB
4. 109.414 1,540.363 ↑ 1.8 120,126 5 / 5

Parallel Hash Join (cost=1,404.78..648,548.17 rows=212,052 width=261) (actual time=2.876..1,540.363 rows=120,126 loops=5)

  • Hash Cond: (lesson_consume.lesson_pk_id = lesson.id)
5. 1,428.387 1,428.387 ↑ 1.4 497,666 5 / 5

Parallel Seq Scan on lesson_consume (cost=0.00..645,340.97 rows=686,530 width=209) (actual time=0.158..1,428.387 rows=497,666 loops=5)

  • Filter: ((NOT is_delete) AND (NOT is_dropped) AND (charge_status = 0))
  • Rows Removed by Filter: 1,860,285
6. 0.342 2.562 ↑ 6.2 784 5 / 5

Parallel Hash (cost=1,343.62..1,343.62 rows=4,893 width=60) (actual time=2.561..2.562 rows=784 loops=5)

  • Buckets: 16,384 Batches: 1 Memory Usage: 576kB
7. 2.220 2.220 ↑ 3.7 1,306 3 / 5

Parallel Seq Scan on lesson (cost=0.00..1,343.62 rows=4,893 width=60) (actual time=0.218..3.700 rows=1,306 loops=3)

  • Filter: ((start_time >= '2020-03-26 16:00:00+00'::timestamp with time zone) AND (end_time <= '2020-06-24 15:59:59+00'::timestamp with time zone))
  • Rows Removed by Filter: 7,934
Planning time : 0.512 ms
Execution time : 1,661.106 ms