explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Dlj : Optimization for: Optimization for: Optimization for: Optimization for: plan #exUV; plan #Bws7; plan #MGuE; plan #j31f

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.045 14.394 ↑ 1.0 1 1

Aggregate (cost=2,319.45..2,319.46 rows=1 width=8) (actual time=14.393..14.394 rows=1 loops=1)

2. 0.361 13.349 ↓ 10.7 762 1

Nested Loop (cost=240.39..2,319.27 rows=71 width=25) (actual time=0.899..13.349 rows=762 loops=1)

3. 0.508 8.137 ↓ 8.1 693 1

Nested Loop (cost=239.97..2,120.88 rows=86 width=50) (actual time=0.882..8.137 rows=693 loops=1)

4. 0.723 6.822 ↓ 3.7 807 1

Nested Loop (cost=239.68..2,051.31 rows=217 width=58) (actual time=0.862..6.822 rows=807 loops=1)

5. 0.303 2.064 ↓ 3.7 807 1

Hash Join (cost=239.27..1,652.25 rows=217 width=50) (actual time=0.848..2.064 rows=807 loops=1)

  • Hash Cond: ((curriculum_record.class_id)::text = (class.class_id)::text)
6. 1.067 1.067 ↑ 1.7 846 1

Index Scan using curriculum_record_curriculum_id_id_idx on curriculum_record (cost=0.42..1,409.55 rows=1,468 width=74) (actual time=0.146..1.067 rows=846 loops=1)

  • Index Cond: ((curriculum_id)::text = ANY ('{5f17dd0e2ea862000162dae6,5f17dd0e2ea862000162dae6,5f58a7aee762ef0001e9c964,5f2e1872e68d2a00012d26b7,5f27696e1d10fc000182ee34,5f17dd0e2ea862000162dae6,5f23d7dd2ab9840001d48ef2,5f090ebfff99900001c9a575,5f2642a81d10fc000182edae,5f28ff749b0d5800015a86c8,5f28ff2d9b0d5800015a86c7,5f3b2ae3cca12b0001c906f0,5f2b78b91a1b6f0001cd80e0,5f2b77cf1a1b6f0001cd7fa6,5f2b78551a1b6f0001cd8061,5f2b7d2d47b28f0001d1aeef,5f2bb016ca26840001fcf599,5f31f3f675aa9f00017a6361,5f31f62875aa9f00017a63b7,5d458296b277f10001dd003a,5f31f64475aa9f00017a63c1,5f350c10bfa45a0001bf263a,5f350c08bfa45a0001bf2630,5f350c02bfa45a0001bf262b,5f350c0cbfa45a0001bf2635,5f3f92a7db2f3900010a7290,5f3f92b3db2f3900010a7297,5f127036d031ce00018fef42,5eba5a41b93b88000166bdd9,5efd8ad1344b4a00011e62d8,5f3f938bdb2f3900010a72ad,5f3f9390db2f3900010a72b4,5f3f9386db2f3900010a72a6,5f12cc9740238200017639e1,5f3f92bddb2f3900010a729e,5f1e313e71463c0001809425,5f058839a18fc00001f44936,5f058819a18fc00001f44926,5f058831a18fc00001f4492e,5f1e356680a1fe000130bf0d,5f1e361880a1fe000130bf12,5efd8c0b344b4a00011e62ed,5f155d2a9f656c000145c1df,5f155d2a9f656c000145c1df,5f155d2a9f656c000145c1df,5f155d2a9f656c000145c1df,5f155d379f656c000145c208,5f155d379f656c000145c208,5f1eaa547ec6d900018dd673,5f155d379f656c000145c208,5f155d379f656c000145c208,5f114841fb5617000197dda2,5f155d049352910001eb8acc,5f155d049352910001eb8acc,5f155d049352910001eb8acc,5f104cd03328dd00015ceaee,5f0ea1755cb3ff000107c137,5f155d049352910001eb8acc,5f155d19aea4090001f9b8d4,5efa9f743eb167000141c9e6,5f155d19aea4090001f9b8d4,5f155d469f656c000145c209,5f17dc0e2ea862000162dab1,5f155d469f656c000145c209,5f155d469f656c000145c209,5f155d469f656c000145c209,5f155d5aaea4090001f9b8e9,5f155d5aaea4090001f9b8e9,5f155d5aaea4090001f9b8e9,5f155d5aaea4090001f9b8e9,5f1e32e471463c0001809440,5f222ed1b9b41c0001dba15d,5f17dd0e2ea862000162dae6,5e8405095c7d010001b649be,5f04684184637200015095b6,5f17a81fc3e3580001ca7459,5f14ec59c766cc000192eaa3,5f20e261b48af80001870df1,5f1951b717154b000180a510,5f1e3ffbe24cec0001a08a94,5f16bae28ec2f500013bc5cf,5f0e791fde6fdc00013d69f1,5f200d4f39b436000187178b,5f1eab3c7ec6d900018dd67a,5f155d19aea4090001f9b8d4,5f155d19aea4090001f9b8d4,5f1e4542e74aeb0001587fd5,5f11565cde27e00001bd8ab0,5d458296b277f10001dd003a,5d458296b277f10001dd003a}'::text[]))
  • Filter: (status = ANY ('{2,5}'::integer[]))
  • Rows Removed by Filter: 74
7. 0.212 0.694 ↓ 1.0 1,224 1

Hash (cost=223.82..223.82 rows=1,202 width=25) (actual time=0.694..0.694 rows=1,224 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 85kB
8. 0.406 0.482 ↓ 1.0 1,224 1

Bitmap Heap Scan on class (cost=33.80..223.82 rows=1,202 width=25) (actual time=0.092..0.482 rows=1,224 loops=1)

  • Recheck Cond: ((tutor_id)::text = '5a31ebe1de18e20001582f02'::text)
  • Heap Blocks: exact=147
9. 0.076 0.076 ↓ 1.0 1,224 1

Bitmap Index Scan on class_tutor_id_idx (cost=0.00..33.50 rows=1,202 width=0) (actual time=0.076..0.076 rows=1,224 loops=1)

  • Index Cond: ((tutor_id)::text = '5a31ebe1de18e20001582f02'::text)
10. 4.035 4.035 ↑ 1.0 1 807

Index Scan using user_student_user_student_id_idx on user_student (cost=0.41..1.84 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=807)

  • Index Cond: ((user_student_id)::text = (curriculum_record.student_id)::text)
11. 0.807 0.807 ↑ 1.0 1 807

Index Scan using student_transfer_user_student_id_idx on student_transfer (cost=0.29..0.32 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=807)

  • Index Cond: (user_student_id = user_student.id)
  • Filter: (transfer_status = ANY ('{2002,1002,2004,1004,2003,1003}'::integer[]))
  • Rows Removed by Filter: 0
12. 4.851 4.851 ↑ 1.0 1 693

Index Scan using order_product_order_num_product_id_idx on order_product op (cost=0.42..2.30 rows=1 width=25) (actual time=0.007..0.007 rows=1 loops=693)

  • Index Cond: ((order_num)::text = (curriculum_record.order_num)::text)
  • Filter: (genre = ANY ('{1,8}'::integer[]))
  • Rows Removed by Filter: 0
Planning time : 1.986 ms
Execution time : 14.454 ms