explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DpS8 : v_seach

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,690.91..15,249.38 rows=10,002 width=2,666) (actual rows= loops=)

  • Hash Cond: (p.id = person_drafts.master_record_id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,682.56..10,163.76 rows=10,002 width=3,597) (actual rows= loops=)

  • Hash Cond: (p.id = p_link.person_id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,653.61..10,108.54 rows=10,002 width=3,589) (actual rows= loops=)

  • Hash Cond: (p.id = ad.person_id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,631.58..10,048.99 rows=10,002 width=3,531) (actual rows= loops=)

  • Hash Cond: (p.id = m.person_id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,612.38..9,992.28 rows=10,002 width=3,515) (actual rows= loops=)

  • Hash Cond: (p.id = adi.person_id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,569.45..9,596.67 rows=10,002 width=3,483) (actual rows= loops=)

  • Hash Cond: (p.d_person_type_id = pt.id)
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,556.52..9,557.49 rows=10,002 width=2,971) (actual rows= loops=)

  • Hash Cond: (p.d_source_data_type_id = pdt.id)
8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,543.60..9,518.31 rows=10,002 width=2,447) (actual rows= loops=)

  • Hash Cond: (p.d_country_id = c.id)
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,535.73..9,484.18 rows=10,002 width=2,380) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,535.30..2,007.17 rows=10,002 width=1,845) (actual rows= loops=)

  • Hash Cond: (p.id = gd.person_id)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=78.65..524.25 rows=10,002 width=1,837) (actual rows= loops=)

  • Hash Cond: (p.d_sex_type_id = s.id)
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=65.73..485.07 rows=10,002 width=1,317) (actual rows= loops=)

  • Hash Cond: (p.d_stat_rec_id = ps.id)
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=53.25..446.34 rows=10,002 width=687) (actual rows= loops=)

  • Hash Cond: (p.id = oms.person_id)
14. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=42.54..398.11 rows=10,002 width=569) (actual rows= loops=)

  • Hash Cond: (p.id = og.person_id)
15. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=30.43..348.48 rows=10,002 width=511) (actual rows= loops=)

  • Hash Cond: (p.id = sn.person_id)
16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=19.62..300.15 rows=10,002 width=393) (actual rows= loops=)

  • Hash Cond: (p.id = n.person_id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on person p (cost=0.00..243.02 rows=10,002 width=217) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=19.60..19.60 rows=1 width=184) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.14..19.60 rows=1 width=184) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on person_inn n (cost=0.00..11.30 rows=1 width=70) (actual rows= loops=)

  • Filter: (date_to IS NULL)
21. 0.000 0.000 ↓ 0.0

Index Scan using pk_d_stat_rec on d_stat_rec ns (cost=0.14..8.16 rows=1 width=122) (actual rows= loops=)

  • Index Cond: (n.d_stat_rec_id = id)
22. 0.000 0.000 ↓ 0.0

Hash (cost=10.80..10.80 rows=1 width=126) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on person_snils sn (cost=0.00..10.80 rows=1 width=126) (actual rows= loops=)

  • Filter: (date_to IS NULL)
24. 0.000 0.000 ↓ 0.0

Hash (cost=12.10..12.10 rows=1 width=66) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on person_ogrnip og (cost=0.00..12.10 rows=1 width=66) (actual rows= loops=)

  • Filter: (date_to IS NULL)
26. 0.000 0.000 ↓ 0.0

Hash (cost=10.70..10.70 rows=1 width=126) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on person_oms oms (cost=0.00..10.70 rows=1 width=126) (actual rows= loops=)

  • Filter: (date_to IS NULL)
28. 0.000 0.000 ↓ 0.0

Hash (cost=11.10..11.10 rows=110 width=638) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on d_stat_rec ps (cost=0.00..11.10 rows=110 width=638) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=11.30..11.30 rows=130 width=528) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on d_sex_type s (cost=0.00..11.30 rows=130 width=528) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=1,331.64..1,331.64 rows=10,000 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,131.64..1,231.64 rows=10,000 width=16) (actual rows= loops=)

  • Group Key: gd.person_id
34. 0.000 0.000 ↓ 0.0

Hash Join (cost=11.35..781.59 rows=20,003 width=32) (actual rows= loops=)

  • Hash Cond: (gd.d_ident_doc_type_id = gdt.id)
35. 0.000 0.000 ↓ 0.0

Seq Scan on person_ident_doc gd (cost=0.00..714.03 rows=20,003 width=20) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash (cost=10.60..10.60 rows=60 width=20) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on d_ident_doc_type gdt (cost=0.00..10.60 rows=60 width=20) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..0.74 rows=1 width=551) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Index Scan using pk_person_ident_doc on person_ident_doc d (cost=0.29..0.58 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (id = (COALESCE(max(CASE WHEN ((gdt.code)::text = '21'::text) THEN gd.id ELSE NULL::bigint END), max(CASE WHEN ((gdt.code)::text = '3'::text) THEN gd.id ELSE NULL::bigint END), max(CASE WHEN ((gdt.code)::text <> ALL ('{21,3}'::text[])) THEN gd.id ELSE NULL::bigint END))))
40. 0.000 0.000 ↓ 0.0

Index Scan using pk_d_ident_doc_type on d_ident_doc_type dt (cost=0.14..0.16 rows=1 width=536) (actual rows= loops=)

  • Index Cond: (id = d.d_ident_doc_type_id)
41. 0.000 0.000 ↓ 0.0

Hash (cost=5.72..5.72 rows=172 width=71) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Seq Scan on d_country c (cost=0.00..5.72 rows=172 width=71) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Hash (cost=11.30..11.30 rows=130 width=532) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on d_person_data_type pdt (cost=0.00..11.30 rows=130 width=532) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Hash (cost=11.30..11.30 rows=130 width=520) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Seq Scan on d_person_type pt (cost=0.00..11.30 rows=130 width=520) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash (cost=39.69..39.69 rows=260 width=40) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=25.70..39.69 rows=260 width=40) (actual rows= loops=)

  • Hash Cond: (adi.d_marital_status_id = mars.id)
49. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12.93..26.22 rows=260 width=28) (actual rows= loops=)

  • Hash Cond: (adi.d_education_level_id = el.id)
50. 0.000 0.000 ↓ 0.0

Seq Scan on person_add_info adi (cost=0.00..12.60 rows=260 width=16) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Hash (cost=11.30..11.30 rows=130 width=20) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Seq Scan on d_education_level el (cost=0.00..11.30 rows=130 width=20) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Hash (cost=12.60..12.60 rows=14 width=20) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on d_marital_status mars (cost=0.00..12.60 rows=14 width=20) (actual rows= loops=)

  • Filter: ((tech_date_from <= now()) AND (tech_date_to > now()))
55. 0.000 0.000 ↓ 0.0

Hash (cost=19.18..19.18 rows=1 width=24) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.14..19.18 rows=1 width=24) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Seq Scan on person_military m (cost=0.00..10.90 rows=1 width=12) (actual rows= loops=)

  • Filter: (date_to IS NULL)
58. 0.000 0.000 ↓ 0.0

Index Scan using pk_d_military_status on d_military_status ms (cost=0.14..8.16 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (m.d_military_status_id = id)
59. 0.000 0.000 ↓ 0.0

Hash (cost=22.02..22.02 rows=1 width=66) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Hash Join (cost=11.64..22.02 rows=1 width=66) (actual rows= loops=)

  • Hash Cond: (ad.d_addr_type_id = adt.id)
61. 0.000 0.000 ↓ 0.0

Seq Scan on person_addr ad (cost=0.00..10.30 rows=30 width=70) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash (cost=11.62..11.62 rows=1 width=4) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Seq Scan on d_addr_type adt (cost=0.00..11.62 rows=1 width=4) (actual rows= loops=)

  • Filter: ((code)::text = '2'::text)
64. 0.000 0.000 ↓ 0.0

Hash (cost=27.20..27.20 rows=140 width=16) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Subquery Scan on p_link (cost=24.40..27.20 rows=140 width=16) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

HashAggregate (cost=24.40..25.80 rows=140 width=16) (actual rows= loops=)

  • Group Key: pl.person_id_to
67. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.57..23.35 rows=140 width=28) (actual rows= loops=)

  • Hash Cond: (pl.d_person_link_type_id = d_1.id)
68. 0.000 0.000 ↓ 0.0

Seq Scan on person_link pl (cost=0.00..11.40 rows=140 width=20) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Hash (cost=10.70..10.70 rows=70 width=20) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Seq Scan on d_person_link_type d_1 (cost=0.00..10.70 rows=70 width=20) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Hash (cost=8.33..8.33 rows=1 width=40) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Subquery Scan on person_drafts (cost=0.29..8.33 rows=1 width=40) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.29..8.32 rows=1 width=40) (actual rows= loops=)

  • Group Key: person.master_record_id
74. 0.000 0.000 ↓ 0.0

Index Scan using ix_person_1 on person (cost=0.29..8.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (master_record_id IS NOT NULL)
  • Filter: (master_record_id <> id)