explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uS1I

Settings
# exclusive inclusive rows x rows loops node
1. 15.062 216.656 ↑ 1.0 20,009 1

Nested Loop Left Join (cost=1,311.84..4,682,423.68 rows=20,009 width=362) (actual time=50.834..216.656 rows=20,009 loops=1)

2. 6.652 81.124 ↑ 1.0 20,009 1

Hash Left Join (cost=1,300.61..4,564.09 rows=20,009 width=134) (actual time=50.550..81.124 rows=20,009 loops=1)

  • Hash Cond: (license.licensing_manager_id = license_manager.id)
3. 6.279 73.290 ↑ 1.0 20,009 1

Hash Left Join (cost=1,217.83..4,428.67 rows=20,009 width=129) (actual time=49.250..73.290 rows=20,009 loops=1)

  • Hash Cond: (license.licensee_id = licensee.id)
4. 4.587 58.785 ↑ 1.0 20,009 1

Hash Left Join (cost=739.99..3,898.28 rows=20,009 width=114) (actual time=40.924..58.785 rows=20,009 loops=1)

  • Hash Cond: (project.sync_author_user_id = userauthor.id)
5. 29.124 52.937 ↑ 1.0 20,009 1

Hash Join (cost=657.20..3,762.98 rows=20,009 width=109) (actual time=39.632..52.937 rows=20,009 loops=1)

  • Hash Cond: (project.id = license.project_id)
6. 12.578 12.578 ↑ 1.0 77,519 1

Seq Scan on project (cost=0.00..2,421.19 rows=77,519 width=63) (actual time=0.016..12.578 rows=77,519 loops=1)

7. 6.560 11.235 ↑ 1.0 20,009 1

Hash (cost=407.09..407.09 rows=20,009 width=54) (actual time=11.235..11.235 rows=20,009 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,820kB
8. 4.675 4.675 ↑ 1.0 20,009 1

Seq Scan on project_license license (cost=0.00..407.09 rows=20,009 width=54) (actual time=0.019..4.675 rows=20,009 loops=1)

9. 0.658 1.261 ↓ 1.0 1,947 1

Hash (cost=58.46..58.46 rows=1,946 width=21) (actual time=1.261..1.261 rows=1,947 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 126kB
10. 0.603 0.603 ↓ 1.0 1,947 1

Seq Scan on ""user"" userauthor (cost=0.00..58.46 rows=1,946 width=21) (actual time=0.035..0.603 rows=1,947 loops=1)

11. 4.415 8.226 ↑ 1.0 11,815 1

Hash (cost=330.15..330.15 rows=11,815 width=31) (actual time=8.226..8.226 rows=11,815 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 897kB
12. 3.811 3.811 ↑ 1.0 11,815 1

Seq Scan on contact licensee (cost=0.00..330.15 rows=11,815 width=31) (actual time=0.030..3.811 rows=11,815 loops=1)

13. 0.607 1.182 ↓ 1.0 1,947 1

Hash (cost=58.46..58.46 rows=1,946 width=21) (actual time=1.182..1.182 rows=1,947 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 126kB
14. 0.575 0.575 ↓ 1.0 1,947 1

Seq Scan on ""user"" license_manager (cost=0.00..58.46 rows=1,946 width=21) (actual time=0.031..0.575 rows=1,947 loops=1)

15. 20.009 60.027 ↑ 1.0 1 20,009

Aggregate (cost=11.23..11.24 rows=1 width=1) (actual time=0.003..0.003 rows=1 loops=20,009)

16. 40.018 40.018 ↑ 1.0 2 20,009

Index Scan using request_project_index on project_request pr (cost=0.29..11.22 rows=2 width=8) (actual time=0.001..0.002 rows=2 loops=20,009)

  • Index Cond: (project_id = project.id)
17.          

SubPlan (for Nested Loop Left Join)

18. 0.012 0.012 ↑ 2.0 1 3

Index Scan using request_project_index on project_request (cost=0.29..11.22 rows=2 width=8) (actual time=0.003..0.004 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
19. 0.012 0.018 ↑ 1.0 1 3

Index Scan using recording_pkey on recording (cost=11.65..19.67 rows=1 width=25) (actual time=0.006..0.006 rows=1 loops=3)

  • Index Cond: (id = $2)
20.          

Initplan (for Index Scan)

21. 0.006 0.006 ↑ 2.0 1 3

Index Scan using request_project_index on project_request project_request_1 (cost=0.29..11.22 rows=2 width=8) (actual time=0.002..0.002 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
22. 0.009 0.081 ↑ 1.0 1 3

Aggregate (cost=23.36..23.37 rows=1 width=32) (actual time=0.027..0.027 rows=1 loops=3)

23. 0.003 0.072 ↑ 2.0 1 3

Nested Loop Left Join (cost=1.57..23.35 rows=2 width=25) (actual time=0.023..0.024 rows=1 loops=3)

24. 0.006 0.051 ↑ 2.0 1 3

Nested Loop Left Join (cost=1.15..21.96 rows=2 width=8) (actual time=0.016..0.017 rows=1 loops=3)

25. 0.006 0.027 ↑ 2.0 1 3

Nested Loop (cost=0.72..20.12 rows=2 width=8) (actual time=0.009..0.009 rows=1 loops=3)

26. 0.006 0.006 ↑ 2.0 1 3

Index Scan using request_project_index on project_request project_request_2 (cost=0.29..11.22 rows=2 width=8) (actual time=0.002..0.002 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
27. 0.015 0.015 ↑ 1.0 1 3

Index Only Scan using recording_pkey on recording recording_1 (cost=0.43..4.45 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = project_request_2.recording_id)
  • Heap Fetches: 0
28. 0.018 0.018 ↑ 1.0 1 3

Index Scan using recording_artist_recording_id_index on recording_artist (cost=0.43..0.91 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=3)

  • Index Cond: (recording_id = recording_1.id)
29. 0.018 0.018 ↑ 1.0 1 3

Index Scan using artist_pkey on artist (cost=0.42..0.70 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=3)

  • Index Cond: (id = recording_artist.artist_id)
30. 0.006 0.150 ↑ 1.0 1 3

Aggregate (cost=58.17..58.18 rows=1 width=32) (actual time=0.050..0.050 rows=1 loops=3)

31. 0.004 0.144 ↑ 4.0 1 3

Nested Loop Left Join (cost=29.42..58.15 rows=4 width=20) (actual time=0.045..0.048 rows=1 loops=3)

32. 0.007 0.120 ↑ 4.0 1 3

Nested Loop (cost=28.99..45.15 rows=4 width=8) (actual time=0.039..0.040 rows=1 loops=3)

33. 0.003 0.099 ↑ 2.0 1 3

Nested Loop (cost=28.56..35.68 rows=2 width=8) (actual time=0.033..0.033 rows=1 loops=3)

34. 0.006 0.063 ↑ 2.0 1 3

Unique (cost=28.13..28.14 rows=2 width=16) (actual time=0.020..0.021 rows=1 loops=3)

35. 0.027 0.057 ↑ 2.0 1 3

Sort (cost=28.13..28.14 rows=2 width=16) (actual time=0.019..0.019 rows=1 loops=3)

  • Sort Key: ((recording_2.song_code)::text)
  • Sort Method: quicksort Memory: 25kB
36. 0.006 0.030 ↑ 2.0 1 3

Nested Loop (cost=0.72..28.12 rows=2 width=16) (actual time=0.009..0.010 rows=1 loops=3)

37. 0.009 0.009 ↑ 2.0 1 3

Index Scan using request_project_index on project_request project_request_3 (cost=0.29..11.22 rows=2 width=8) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
38. 0.015 0.015 ↑ 1.0 1 3

Index Scan using recording_pkey on recording recording_2 (cost=0.43..8.45 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = project_request_3.recording_id)
39. 0.033 0.033 ↑ 1.0 1 3

Index Scan using work_code_index on work (cost=0.43..3.77 rows=1 width=24) (actual time=0.011..0.011 rows=1 loops=3)

  • Index Cond: ((work_code)::text = (recording_2.song_code)::text)
40. 0.014 0.014 ↑ 1.0 2 2

Index Scan using work_creator_work_index on work_writer (cost=0.43..4.71 rows=2 width=16) (actual time=0.007..0.007 rows=2 loops=2)

  • Index Cond: (work_id = work.id)
41. 0.020 0.020 ↑ 1.0 1 4

Index Scan using creator_pkey on writer (cost=0.43..3.25 rows=1 width=28) (actual time=0.005..0.005 rows=1 loops=4)

  • Index Cond: (work_writer.writer_id = id)
42. 0.006 0.027 ↑ 2.0 1 3

Nested Loop (cost=0.72..28.12 rows=2 width=16) (actual time=0.009..0.009 rows=1 loops=3)

43. 0.009 0.009 ↑ 2.0 1 3

Index Scan using request_project_index on project_request project_request_4 (cost=0.29..11.22 rows=2 width=8) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
44. 0.012 0.012 ↑ 1.0 1 3

Index Scan using recording_pkey on recording recording_3 (cost=0.43..8.45 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=3)

  • Index Cond: (id = project_request_4.recording_id)
45. 0.009 0.108 ↑ 2.0 1 3

Nested Loop (cost=0.72..28.12 rows=2 width=12) (actual time=0.035..0.036 rows=1 loops=3)

46. 0.090 0.090 ↑ 2.0 1 3

Index Scan using request_project_index on project_request project_request_5 (cost=0.29..11.22 rows=2 width=8) (actual time=0.030..0.030 rows=1 loops=3)

  • Index Cond: (project_id = project.id)
47. 0.009 0.009 ↑ 1.0 1 3

Index Scan using recording_pkey on recording recording_4 (cost=0.43..8.45 rows=1 width=20) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (id = project_request_5.recording_id)
48. 0.000 60.027 ↑ 1.0 1 20,009

Aggregate (cost=17.94..17.95 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=20,009)

49. 0.000 60.027 ↓ 0.0 0 20,009

Nested Loop (cost=0.30..17.94 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=20,009)

50. 60.027 60.027 ↓ 0.0 0 20,009

Index Scan using project_attachment_category_index on project_attachment (cost=0.15..8.17 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=20,009)

  • Index Cond: ((category)::text = 'CUE_SHEET'::text)
51. 0.000 0.000 ↓ 0.0 0

Index Only Scan using project_license_attachment_license_id_attachment_id_key on project_license_attachment (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: ((license_id = license.id) AND (attachment_id = project_attachment.id))
  • Heap Fetches: 0
52. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.30..17.94 rows=1 width=0) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using project_attachment_category_index on project_attachment project_attachment_1 (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: ((category)::text = 'PARTIALLY_EXECUTED'::text)
54. 0.000 0.000 ↓ 0.0 0

Index Only Scan using project_license_attachment_license_id_attachment_id_key on project_license_attachment project_license_attachment_1 (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: ((license_id = license.id) AND (attachment_id = project_attachment_1.id))
  • Heap Fetches: 0
55. 0.000 0.012 ↓ 0.0 0 1

Nested Loop (cost=4.37..23.02 rows=7 width=8) (actual time=0.012..0.012 rows=0 loops=1)

56. 0.012 0.012 ↓ 0.0 0 1

Index Scan using project_attachment_category_index on project_attachment project_attachment_2 (cost=0.15..8.17 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((category)::text = 'PARTIALLY_EXECUTED'::text)
57. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on project_license_attachment project_license_attachment_2 (cost=4.22..14.76 rows=9 width=16) (never executed)

  • Recheck Cond: (attachment_id = project_attachment_2.id)
58. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on project_license_attachment_attachment_id_index (cost=0.00..4.22 rows=9 width=0) (never executed)

  • Index Cond: (attachment_id = project_attachment_2.id)
59. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.30..17.94 rows=1 width=0) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Index Scan using project_attachment_category_index on project_attachment project_attachment_3 (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: ((category)::text = 'FULLY_EXECUTED'::text)
61. 0.000 0.000 ↓ 0.0 0

Index Only Scan using project_license_attachment_license_id_attachment_id_key on project_license_attachment project_license_attachment_3 (cost=0.15..8.17 rows=1 width=8) (never executed)

  • Index Cond: ((license_id = license.id) AND (attachment_id = project_attachment_3.id))
  • Heap Fetches: 0
62. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=4.37..23.02 rows=7 width=8) (actual time=0.008..0.008 rows=0 loops=1)

63. 0.008 0.008 ↓ 0.0 0 1

Index Scan using project_attachment_category_index on project_attachment project_attachment_4 (cost=0.15..8.17 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((category)::text = 'FULLY_EXECUTED'::text)
64. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on project_license_attachment project_license_attachment_4 (cost=4.22..14.76 rows=9 width=16) (never executed)

  • Recheck Cond: (attachment_id = project_attachment_4.id)
65. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on project_license_attachment_attachment_id_index (cost=0.00..4.22 rows=9 width=0) (never executed)

  • Index Cond: (attachment_id = project_attachment_4.id)