explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SF1c

Settings
# exclusive inclusive rows x rows loops node
1. 0.243 47.427 ↑ 8.2 5 1

Hash Semi Join (cost=41.59..16,343.41 rows=41 width=577) (actual time=10.667..47.427 rows=5 loops=1)

  • Hash Cond: (objects_part.object_type_id = c.object_type_id)
2.          

CTE au

3. 0.008 0.061 ↑ 1.8 5 1

HashAggregate (cost=4.55..4.64 rows=9 width=4) (actual time=0.059..0.061 rows=5 loops=1)

  • Group Key: user_roles.role_id
4. 0.001 0.053 ↑ 1.8 5 1

Append (cost=0.29..4.53 rows=9 width=4) (actual time=0.051..0.053 rows=5 loops=1)

5. 0.052 0.052 ↑ 2.0 4 1

Index Only Scan using user_roles_pkey on user_roles (cost=0.29..4.43 rows=8 width=4) (actual time=0.050..0.052 rows=4 loops=1)

  • Index Cond: (user_id = 10003)
  • Heap Fetches: 0
6. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=1)

7. 0.007 0.808 ↑ 13.1 10 1

Append (cost=0.00..962.88 rows=131 width=529) (actual time=0.089..0.808 rows=10 loops=1)

8. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on objects_part (cost=0.00..0.00 rows=1 width=95) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
9. 0.197 0.197 ↑ 1.0 10 1

Index Scan using objects_part00_pkey on objects_part00 (cost=0.43..76.34 rows=10 width=95) (actual time=0.086..0.197 rows=10 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
10. 0.069 0.069 ↓ 0.0 0 1

Index Scan using objects_part01_pkey on objects_part01 (cost=0.42..78.92 rows=10 width=652) (actual time=0.069..0.069 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
11. 0.026 0.026 ↓ 0.0 0 1

Index Scan using objects_part02_pkey on objects_part02 (cost=0.43..48.45 rows=10 width=652) (actual time=0.026..0.026 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
12. 0.045 0.045 ↓ 0.0 0 1

Index Scan using objects_part03_pkey on objects_part03 (cost=0.42..83.51 rows=10 width=652) (actual time=0.045..0.045 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
13. 0.002 0.047 ↓ 0.0 0 1

Bitmap Heap Scan on objects_part04 (cost=44.28..82.95 rows=10 width=153) (actual time=0.047..0.047 rows=0 loops=1)

  • Recheck Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
14. 0.045 0.045 ↓ 0.0 0 1

Bitmap Index Scan on objects_part04_pkey (cost=0.00..44.28 rows=10 width=0) (actual time=0.045..0.045 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
15. 0.051 0.051 ↓ 0.0 0 1

Index Scan using objects_part05_pkey on objects_part05 (cost=0.43..84.22 rows=10 width=652) (actual time=0.051..0.051 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
16. 0.027 0.027 ↓ 0.0 0 1

Index Scan using objects_part06_pkey on objects_part06 (cost=0.43..84.47 rows=10 width=652) (actual time=0.027..0.027 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
17. 0.047 0.047 ↓ 0.0 0 1

Index Scan using objects_part07_pkey on objects_part07 (cost=0.43..69.89 rows=10 width=652) (actual time=0.047..0.047 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
18. 0.065 0.065 ↓ 0.0 0 1

Index Scan using objects_part10_pkey on objects_part10 (cost=0.42..73.08 rows=10 width=153) (actual time=0.064..0.065 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
19. 0.052 0.052 ↓ 0.0 0 1

Index Scan using objects_part09_pkey on objects_part09 (cost=0.42..84.24 rows=10 width=652) (actual time=0.051..0.052 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
20. 0.052 0.052 ↓ 0.0 0 1

Index Scan using objects_part08_pkey on objects_part08 (cost=0.42..82.21 rows=10 width=652) (actual time=0.052..0.052 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
21. 0.058 0.058 ↓ 0.0 0 1

Index Scan using objects_part11_pkey on objects_part11 (cost=0.42..65.14 rows=10 width=652) (actual time=0.058..0.058 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
22. 0.062 0.062 ↓ 0.0 0 1

Index Scan using objects_part12_pkey on objects_part12 (cost=0.43..49.46 rows=10 width=652) (actual time=0.062..0.062 rows=0 loops=1)

  • Index Cond: (id = ANY ('{485636381,485636453,485636527,485636595,485636732,485636759,485636941,499303100,485637170,485637211}'::integer[]))
23. 0.018 0.206 ↓ 2.4 100 1

Hash (cost=36.43..36.43 rows=41 width=8) (actual time=0.206..0.206 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
24. 0.013 0.188 ↓ 2.4 100 1

Nested Loop (cost=0.28..36.43 rows=41 width=8) (actual time=0.097..0.188 rows=100 loops=1)

25. 0.065 0.065 ↑ 1.8 5 1

CTE Scan on au (cost=0.00..0.18 rows=9 width=4) (actual time=0.060..0.065 rows=5 loops=1)

26. 0.110 0.110 ↓ 4.0 20 5

Index Only Scan using c_role_objtype_roleid_object_type_id_action_key on c_role_objtype c (cost=0.28..3.98 rows=5 width=10) (actual time=0.013..0.022 rows=20 loops=5)

  • Index Cond: ((roleid = au.authid) AND (action = 'show'::text))
  • Heap Fetches: 0
27.          

SubPlan (for Hash Semi Join)

28. 7.470 46.170 ↑ 1.0 1 5

Aggregate (cost=374.09..374.10 rows=1 width=32) (actual time=9.234..9.234 rows=1 loops=5)

29. 1.215 38.700 ↓ 156.0 156 5

Nested Loop (cost=155.23..374.05 rows=1 width=501) (actual time=1.015..7.740 rows=156 loops=5)

30. 1.630 14.960 ↓ 265.0 265 5

Nested Loop (cost=155.23..167.90 rows=1 width=18) (actual time=0.991..2.992 rows=265 loops=5)

31. 1.680 12.005 ↓ 265.0 265 5

Nested Loop (cost=154.96..165.32 rows=1 width=20) (actual time=0.979..2.401 rows=265 loops=5)

  • Join Filter: (c_1.tep_id = t.id)
32. 0.970 6.350 ↓ 265.0 265 5

Merge Join (cost=154.67..159.45 rows=1 width=12) (actual time=0.963..1.270 rows=265 loops=5)

  • Merge Cond: (c_1.tep_id = crt.tep_id)
33. 0.455 0.455 ↓ 7.1 268 5

Index Only Scan using c_objtype_tep_object_type_id_tep_id_key on c_objtype_tep c_1 (cost=0.29..4.95 rows=38 width=12) (actual time=0.021..0.091 rows=268 loops=5)

  • Index Cond: (object_type_id = objects_part.object_type_id)
  • Heap Fetches: 0
34. 0.440 4.925 ↓ 136.5 273 5

Sort (cost=154.38..154.39 rows=2 width=16) (actual time=0.935..0.985 rows=273 loops=5)

  • Sort Key: crt.tep_id
  • Sort Method: quicksort Memory: 37kB
35. 0.305 4.485 ↓ 136.5 273 5

Unique (cost=154.36..154.38 rows=2 width=16) (actual time=0.821..0.897 rows=273 loops=5)

36. 0.350 4.180 ↓ 136.5 273 5

Sort (cost=154.36..154.37 rows=2 width=16) (actual time=0.819..0.836 rows=273 loops=5)

  • Sort Key: crt.tep_id, crt.object_type_id
  • Sort Method: quicksort Memory: 37kB
37. 0.195 3.830 ↓ 136.5 273 5

Nested Loop (cost=0.42..154.35 rows=2 width=16) (actual time=0.036..0.766 rows=273 loops=5)

38. 0.010 0.010 ↑ 1.8 5 5

CTE Scan on au au_1 (cost=0.00..0.18 rows=9 width=4) (actual time=0.000..0.002 rows=5 loops=5)

39. 3.625 3.625 ↓ 55.0 55 25

Index Only Scan using c_role_teps_roleid_tep_id_action_object_type_id_key on c_role_teps crt (cost=0.42..17.12 rows=1 width=18) (actual time=0.024..0.145 rows=55 loops=25)

  • Index Cond: ((roleid = au_1.authid) AND (action = 'show'::text) AND (object_type_id = objects_part.object_type_id))
  • Heap Fetches: 0
40. 3.975 3.975 ↑ 1.0 1 1,325

Index Scan using obj_teps_pkey on obj_teps t (cost=0.29..5.85 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1,325)

  • Index Cond: (id = crt.tep_id)
41. 1.325 1.325 ↑ 1.0 1 1,325

Index Only Scan using obj_tep_category_pkey on obj_tep_category ct (cost=0.28..2.58 rows=1 width=2) (actual time=0.001..0.001 rows=1 loops=1,325)

  • Index Cond: (id = t.category_id)
  • Heap Fetches: 0
42. 2.650 22.525 ↑ 93.0 1 1,325

Append (cost=0.00..205.22 rows=93 width=499) (actual time=0.009..0.017 rows=1 loops=1,325)

43. 0.000 0.000 ↓ 0.0 0 1,325

Seq Scan on objtep_part (cost=0.00..0.00 rows=1 width=880) (actual time=0.000..0.000 rows=0 loops=1,325)

  • Filter: ((object_id = objects_part.id) AND (t.id = tep_id))
44. 5.300 5.300 ↑ 1.0 1 1,325

Index Scan using objtep_part00_object_id_tep_id_key on objtep_part00 (cost=0.57..8.50 rows=1 width=488) (actual time=0.003..0.004 rows=1 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
45. 3.975 3.975 ↓ 0.0 0 1,325

Index Scan using objtep_part01_object_id_tep_id_key on objtep_part01 (cost=0.56..12.65 rows=3 width=852) (actual time=0.003..0.003 rows=0 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
46. 2.650 2.650 ↓ 0.0 0 1,325

Index Scan using objtep_part02_object_id_tep_id_key on objtep_part02 (cost=0.57..50.37 rows=24 width=161) (actual time=0.002..0.002 rows=0 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
47. 2.650 2.650 ↓ 0.0 0 1,325

Index Scan using objtep_part03_object_id_tep_id_key on objtep_part03 (cost=0.56..41.08 rows=12 width=131) (actual time=0.002..0.002 rows=0 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
48. 2.650 2.650 ↓ 0.0 0 1,325

Index Scan using objtep_part04_object_id_tep_id_key on objtep_part04 (cost=0.57..78.76 rows=48 width=830) (actual time=0.002..0.002 rows=0 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
49. 2.650 2.650 ↓ 0.0 0 1,325

Index Scan using objtep_part05_object_id_tep_id_key on objtep_part05 (cost=0.56..13.86 rows=4 width=128) (actual time=0.002..0.002 rows=0 loops=1,325)

  • Index Cond: ((object_id = objects_part.id) AND (tep_id = t.id))
Planning time : 16.813 ms
Execution time : 48.042 ms