explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gdsl

Settings
# exclusive inclusive rows x rows loops node
1. 0.107 20,317.609 ↑ 1.0 50 1

Append (cost=149.71..7,486.46 rows=50 width=38) (actual time=637.372..20,317.609 rows=50 loops=1)

2. 0.003 637.373 ↑ 1.0 1 1

Subquery Scan on *SELECT* 1 (cost=149.71..149.73 rows=1 width=38) (actual time=637.371..637.373 rows=1 loops=1)

3. 0.000 637.370 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=637.369..637.370 rows=1 loops=1)

4.          

Initplan (for Limit)

5. 24.908 24.908 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards (cost=0.42..8.44 rows=1 width=2) (actual time=24.905..24.908 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0236349870'::text)
6. 0.892 637.366 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=637.366..637.366 rows=1 loops=1)

  • Sort Key: a.date_start, a.time_start
  • Sort Method: top-N heapsort Memory: 25kB
7. 25.431 636.474 ↓ 83.0 83 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=70.586..636.474 rows=83 loops=1)

  • One-Time Filter: (1 <> $0)
8. 611.043 611.043 ↓ 83.0 83 1

Index Scan using cards_history_pkey on cards_history a (cost=0.56..141.27 rows=1 width=50) (actual time=45.658..611.043 rows=83 loops=1)

  • Index Cond: (((card_number)::text = '0236349870'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 7
9. 0.003 1,085.289 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2 (cost=149.71..149.73 rows=1 width=38) (actual time=1,085.287..1,085.289 rows=1 loops=1)

10. 0.000 1,085.286 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=1,085.285..1,085.286 rows=1 loops=1)

11.          

Initplan (for Limit)

12. 12.012 12.012 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_1 (cost=0.42..8.44 rows=1 width=2) (actual time=12.008..12.012 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0236992942'::text)
13. 1.485 1,085.282 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=1,085.282..1,085.282 rows=1 loops=1)

  • Sort Key: a_1.date_start, a_1.time_start
  • Sort Method: top-N heapsort Memory: 25kB
14. 12.837 1,083.797 ↓ 154.0 154 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=35.507..1,083.797 rows=154 loops=1)

  • One-Time Filter: (1 <> $1)
15. 1,070.960 1,070.960 ↓ 154.0 154 1

Index Scan using cards_history_pkey on cards_history a_1 (cost=0.56..141.27 rows=1 width=50) (actual time=23.475..1,070.960 rows=154 loops=1)

  • Index Cond: (((card_number)::text = '0236992942'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 20
16. 0.005 623.067 ↑ 1.0 1 1

Subquery Scan on *SELECT* 3 (cost=149.71..149.73 rows=1 width=38) (actual time=623.065..623.067 rows=1 loops=1)

17. 0.000 623.062 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=623.061..623.062 rows=1 loops=1)

18.          

Initplan (for Limit)

19. 8.993 8.993 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_2 (cost=0.42..8.44 rows=1 width=2) (actual time=8.989..8.993 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0237270446'::text)
20. 0.853 623.057 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=623.057..623.057 rows=1 loops=1)

  • Sort Key: a_2.date_start, a_2.time_start
  • Sort Method: top-N heapsort Memory: 25kB
21. 9.494 622.204 ↓ 109.0 109 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=40.558..622.204 rows=109 loops=1)

  • One-Time Filter: (1 <> $2)
22. 612.710 612.710 ↓ 109.0 109 1

Index Scan using cards_history_pkey on cards_history a_2 (cost=0.56..141.27 rows=1 width=50) (actual time=31.541..612.710 rows=109 loops=1)

  • Index Cond: (((card_number)::text = '0237270446'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 20
23. 0.003 366.543 ↑ 1.0 1 1

Subquery Scan on *SELECT* 4 (cost=149.71..149.73 rows=1 width=38) (actual time=366.541..366.543 rows=1 loops=1)

24. 0.000 366.540 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=366.539..366.540 rows=1 loops=1)

25.          

Initplan (for Limit)

26. 0.175 0.175 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_3 (cost=0.42..8.44 rows=1 width=2) (actual time=0.174..0.175 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0237619374'::text)
27. 0.484 366.536 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=366.536..366.536 rows=1 loops=1)

  • Sort Key: a_3.date_start, a_3.time_start
  • Sort Method: top-N heapsort Memory: 25kB
28. 0.396 366.052 ↓ 61.0 61 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=30.775..366.052 rows=61 loops=1)

  • One-Time Filter: (1 <> $3)
29. 365.656 365.656 ↓ 61.0 61 1

Index Scan using cards_history_pkey on cards_history a_3 (cost=0.56..141.27 rows=1 width=50) (actual time=30.587..365.656 rows=61 loops=1)

  • Index Cond: (((card_number)::text = '0237619374'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 16
30. 0.004 757.627 ↑ 1.0 1 1

Subquery Scan on *SELECT* 5 (cost=149.71..149.73 rows=1 width=38) (actual time=757.625..757.627 rows=1 loops=1)

31. 0.000 757.623 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=757.623..757.623 rows=1 loops=1)

32.          

Initplan (for Limit)

33. 0.065 0.065 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_4 (cost=0.42..8.44 rows=1 width=2) (actual time=0.064..0.065 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0237686958'::text)
34. 1.226 757.620 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=757.620..757.620 rows=1 loops=1)

  • Sort Key: a_4.date_start, a_4.time_start
  • Sort Method: top-N heapsort Memory: 25kB
35. 0.698 756.394 ↓ 122.0 122 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=28.388..756.394 rows=122 loops=1)

  • One-Time Filter: (1 <> $4)
36. 755.696 755.696 ↓ 122.0 122 1

Index Scan using cards_history_pkey on cards_history a_4 (cost=0.56..141.27 rows=1 width=50) (actual time=28.310..755.696 rows=122 loops=1)

  • Index Cond: (((card_number)::text = '0237686958'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 2
37. 0.004 753.159 ↑ 1.0 1 1

Subquery Scan on *SELECT* 6 (cost=149.71..149.73 rows=1 width=38) (actual time=753.157..753.159 rows=1 loops=1)

38. 0.000 753.155 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=753.154..753.155 rows=1 loops=1)

39.          

Initplan (for Limit)

40. 0.071 0.071 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_5 (cost=0.42..8.44 rows=1 width=2) (actual time=0.070..0.071 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0239386030'::text)
41. 0.984 753.152 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=753.152..753.152 rows=1 loops=1)

  • Sort Key: a_5.date_start, a_5.time_start
  • Sort Method: top-N heapsort Memory: 25kB
42. 0.604 752.168 ↓ 129.0 129 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=41.880..752.168 rows=129 loops=1)

  • One-Time Filter: (1 <> $5)
43. 751.564 751.564 ↓ 129.0 129 1

Index Scan using cards_history_pkey on cards_history a_5 (cost=0.56..141.27 rows=1 width=50) (actual time=41.796..751.564 rows=129 loops=1)

  • Index Cond: (((card_number)::text = '0239386030'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 21
44. 0.004 537.034 ↑ 1.0 1 1

Subquery Scan on *SELECT* 7 (cost=149.71..149.73 rows=1 width=38) (actual time=537.032..537.034 rows=1 loops=1)

45. 0.000 537.030 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=537.029..537.030 rows=1 loops=1)

46.          

Initplan (for Limit)

47. 17.068 17.068 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_6 (cost=0.42..8.44 rows=1 width=2) (actual time=17.064..17.068 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0239562926'::text)
48. 0.765 537.026 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=537.026..537.026 rows=1 loops=1)

  • Sort Key: a_6.date_start, a_6.time_start
  • Sort Method: top-N heapsort Memory: 25kB
49. 17.493 536.261 ↓ 113.0 113 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=32.296..536.261 rows=113 loops=1)

  • One-Time Filter: (1 <> $6)
50. 518.768 518.768 ↓ 113.0 113 1

Index Scan using cards_history_pkey on cards_history a_6 (cost=0.56..141.27 rows=1 width=50) (actual time=15.203..518.768 rows=113 loops=1)

  • Index Cond: (((card_number)::text = '0239562926'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 13
51. 0.003 301.213 ↑ 1.0 1 1

Subquery Scan on *SELECT* 8 (cost=149.71..149.73 rows=1 width=38) (actual time=301.211..301.213 rows=1 loops=1)

52. 0.000 301.210 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=301.209..301.210 rows=1 loops=1)

53.          

Initplan (for Limit)

54. 0.080 0.080 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_7 (cost=0.42..8.44 rows=1 width=2) (actual time=0.079..0.080 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0239655086'::text)
55. 0.355 301.207 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=301.207..301.207 rows=1 loops=1)

  • Sort Key: a_7.date_start, a_7.time_start
  • Sort Method: top-N heapsort Memory: 25kB
56. 0.255 300.852 ↓ 59.0 59 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=25.177..300.852 rows=59 loops=1)

  • One-Time Filter: (1 <> $7)
57. 300.597 300.597 ↓ 59.0 59 1

Index Scan using cards_history_pkey on cards_history a_7 (cost=0.56..141.27 rows=1 width=50) (actual time=25.082..300.597 rows=59 loops=1)

  • Index Cond: (((card_number)::text = '0239655086'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 16
58. 0.003 175.806 ↑ 1.0 1 1

Subquery Scan on *SELECT* 9 (cost=149.71..149.73 rows=1 width=38) (actual time=175.804..175.806 rows=1 loops=1)

59. 0.000 175.803 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=175.802..175.803 rows=1 loops=1)

60.          

Initplan (for Limit)

61. 0.058 0.058 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_8 (cost=0.42..8.44 rows=1 width=2) (actual time=0.057..0.058 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0239876782'::text)
62. 0.214 175.799 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=175.799..175.799 rows=1 loops=1)

  • Sort Key: a_8.date_start, a_8.time_start
  • Sort Method: top-N heapsort Memory: 25kB
63. 0.157 175.585 ↓ 31.0 31 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=15.024..175.585 rows=31 loops=1)

  • One-Time Filter: (1 <> $8)
64. 175.428 175.428 ↓ 31.0 31 1

Index Scan using cards_history_pkey on cards_history a_8 (cost=0.56..141.27 rows=1 width=50) (actual time=14.954..175.428 rows=31 loops=1)

  • Index Cond: (((card_number)::text = '0239876782'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 9
65. 0.004 145.848 ↑ 1.0 1 1

Subquery Scan on *SELECT* 10 (cost=149.71..149.73 rows=1 width=38) (actual time=145.846..145.848 rows=1 loops=1)

66. 0.000 145.844 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=145.843..145.844 rows=1 loops=1)

67.          

Initplan (for Limit)

68. 0.075 0.075 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_9 (cost=0.42..8.44 rows=1 width=2) (actual time=0.074..0.075 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0240836254'::text)
69. 0.249 145.841 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=145.841..145.841 rows=1 loops=1)

  • Sort Key: a_9.date_start, a_9.time_start
  • Sort Method: top-N heapsort Memory: 25kB
70. 0.187 145.592 ↓ 35.0 35 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=25.601..145.592 rows=35 loops=1)

  • One-Time Filter: (1 <> $9)
71. 145.405 145.405 ↓ 35.0 35 1

Index Scan using cards_history_pkey on cards_history a_9 (cost=0.56..141.27 rows=1 width=50) (actual time=25.510..145.405 rows=35 loops=1)

  • Index Cond: (((card_number)::text = '0240836254'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 7
72. 0.003 560.998 ↑ 1.0 1 1

Subquery Scan on *SELECT* 11 (cost=149.71..149.73 rows=1 width=38) (actual time=560.996..560.998 rows=1 loops=1)

73. 0.000 560.995 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=560.995..560.995 rows=1 loops=1)

74.          

Initplan (for Limit)

75. 0.085 0.085 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_10 (cost=0.42..8.44 rows=1 width=2) (actual time=0.084..0.085 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0242194094'::text)
76. 0.906 560.992 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=560.992..560.992 rows=1 loops=1)

  • Sort Key: a_10.date_start, a_10.time_start
  • Sort Method: top-N heapsort Memory: 25kB
77. 0.589 560.086 ↓ 138.0 138 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=26.858..560.086 rows=138 loops=1)

  • One-Time Filter: (1 <> $10)
78. 559.497 559.497 ↓ 138.0 138 1

Index Scan using cards_history_pkey on cards_history a_10 (cost=0.56..141.27 rows=1 width=50) (actual time=26.757..559.497 rows=138 loops=1)

  • Index Cond: (((card_number)::text = '0242194094'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 19
79. 0.003 184.217 ↑ 1.0 1 1

Subquery Scan on *SELECT* 12 (cost=149.71..149.73 rows=1 width=38) (actual time=184.215..184.217 rows=1 loops=1)

80. 0.000 184.214 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=184.213..184.214 rows=1 loops=1)

81.          

Initplan (for Limit)

82. 0.071 0.071 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_11 (cost=0.42..8.44 rows=1 width=2) (actual time=0.070..0.071 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0242417838'::text)
83. 0.280 184.211 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=184.211..184.211 rows=1 loops=1)

  • Sort Key: a_11.date_start, a_11.time_start
  • Sort Method: top-N heapsort Memory: 25kB
84. 0.201 183.931 ↓ 39.0 39 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=19.052..183.931 rows=39 loops=1)

  • One-Time Filter: (1 <> $11)
85. 183.730 183.730 ↓ 39.0 39 1

Index Scan using cards_history_pkey on cards_history a_11 (cost=0.56..141.27 rows=1 width=50) (actual time=18.969..183.730 rows=39 loops=1)

  • Index Cond: (((card_number)::text = '0242417838'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 5
86. 0.002 605.187 ↑ 1.0 1 1

Subquery Scan on *SELECT* 13 (cost=149.71..149.73 rows=1 width=38) (actual time=605.185..605.187 rows=1 loops=1)

87. 0.000 605.185 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=605.184..605.185 rows=1 loops=1)

88.          

Initplan (for Limit)

89. 0.078 0.078 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_12 (cost=0.42..8.44 rows=1 width=2) (actual time=0.076..0.078 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0242608798'::text)
90. 0.855 605.181 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=605.181..605.181 rows=1 loops=1)

  • Sort Key: a_12.date_start, a_12.time_start
  • Sort Method: top-N heapsort Memory: 25kB
91. 0.518 604.326 ↓ 138.0 138 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=30.371..604.326 rows=138 loops=1)

  • One-Time Filter: (1 <> $12)
92. 603.808 603.808 ↓ 138.0 138 1

Index Scan using cards_history_pkey on cards_history a_12 (cost=0.56..141.27 rows=1 width=50) (actual time=30.278..603.808 rows=138 loops=1)

  • Index Cond: (((card_number)::text = '0242608798'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 23
93. 0.003 266.846 ↑ 1.0 1 1

Subquery Scan on *SELECT* 14 (cost=149.71..149.73 rows=1 width=38) (actual time=266.844..266.846 rows=1 loops=1)

94. 0.000 266.843 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=266.842..266.843 rows=1 loops=1)

95.          

Initplan (for Limit)

96. 0.208 0.208 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_13 (cost=0.42..8.44 rows=1 width=2) (actual time=0.206..0.208 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0242808990'::text)
97. 0.403 266.839 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=266.839..266.839 rows=1 loops=1)

  • Sort Key: a_13.date_start, a_13.time_start
  • Sort Method: top-N heapsort Memory: 25kB
98. 0.430 266.436 ↓ 56.0 56 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=41.090..266.436 rows=56 loops=1)

  • One-Time Filter: (1 <> $13)
99. 266.006 266.006 ↓ 56.0 56 1

Index Scan using cards_history_pkey on cards_history a_13 (cost=0.56..141.27 rows=1 width=50) (actual time=40.866..266.006 rows=56 loops=1)

  • Index Cond: (((card_number)::text = '0242808990'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 1
100. 0.004 457.045 ↑ 1.0 1 1

Subquery Scan on *SELECT* 15 (cost=149.71..149.73 rows=1 width=38) (actual time=457.043..457.045 rows=1 loops=1)

101. 0.000 457.041 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=457.041..457.041 rows=1 loops=1)

102.          

Initplan (for Limit)

103. 0.072 0.072 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_14 (cost=0.42..8.44 rows=1 width=2) (actual time=0.071..0.072 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0243067566'::text)
104. 0.721 457.038 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=457.038..457.038 rows=1 loops=1)

  • Sort Key: a_14.date_start, a_14.time_start
  • Sort Method: top-N heapsort Memory: 25kB
105. 0.443 456.317 ↓ 98.0 98 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=32.612..456.317 rows=98 loops=1)

  • One-Time Filter: (1 <> $14)
106. 455.874 455.874 ↓ 98.0 98 1

Index Scan using cards_history_pkey on cards_history a_14 (cost=0.56..141.27 rows=1 width=50) (actual time=32.524..455.874 rows=98 loops=1)

  • Index Cond: (((card_number)::text = '0243067566'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 9
107. 0.004 411.461 ↑ 1.0 1 1

Subquery Scan on *SELECT* 16 (cost=149.71..149.73 rows=1 width=38) (actual time=411.459..411.461 rows=1 loops=1)

108. 0.000 411.457 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=411.456..411.457 rows=1 loops=1)

109.          

Initplan (for Limit)

110. 0.068 0.068 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_15 (cost=0.42..8.44 rows=1 width=2) (actual time=0.067..0.068 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0244357550'::text)
111. 0.687 411.454 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=411.454..411.454 rows=1 loops=1)

  • Sort Key: a_15.date_start, a_15.time_start
  • Sort Method: top-N heapsort Memory: 25kB
112. 0.420 410.767 ↓ 97.0 97 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=19.728..410.767 rows=97 loops=1)

  • One-Time Filter: (1 <> $15)
113. 410.347 410.347 ↓ 97.0 97 1

Index Scan using cards_history_pkey on cards_history a_15 (cost=0.56..141.27 rows=1 width=50) (actual time=19.647..410.347 rows=97 loops=1)

  • Index Cond: (((card_number)::text = '0244357550'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 18
114. 0.002 460.437 ↑ 1.0 1 1

Subquery Scan on *SELECT* 17 (cost=149.71..149.73 rows=1 width=38) (actual time=460.436..460.437 rows=1 loops=1)

115. 0.000 460.435 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=460.434..460.435 rows=1 loops=1)

116.          

Initplan (for Limit)

117. 0.068 0.068 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_16 (cost=0.42..8.44 rows=1 width=2) (actual time=0.067..0.068 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0244684718'::text)
118. 0.875 460.432 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=460.432..460.432 rows=1 loops=1)

  • Sort Key: a_16.date_start, a_16.time_start
  • Sort Method: top-N heapsort Memory: 25kB
119. 0.492 459.557 ↓ 92.0 92 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=19.890..459.557 rows=92 loops=1)

  • One-Time Filter: (1 <> $16)
120. 459.065 459.065 ↓ 92.0 92 1

Index Scan using cards_history_pkey on cards_history a_16 (cost=0.56..141.27 rows=1 width=50) (actual time=19.808..459.065 rows=92 loops=1)

  • Index Cond: (((card_number)::text = '0244684718'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 1
121. 0.002 400.385 ↑ 1.0 1 1

Subquery Scan on *SELECT* 18 (cost=149.71..149.73 rows=1 width=38) (actual time=400.383..400.385 rows=1 loops=1)

122. 0.000 400.383 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=400.382..400.383 rows=1 loops=1)

123.          

Initplan (for Limit)

124. 0.045 0.045 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_17 (cost=0.42..8.44 rows=1 width=2) (actual time=0.045..0.045 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0245922734'::text)
125. 0.639 400.379 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=400.379..400.379 rows=1 loops=1)

  • Sort Key: a_17.date_start, a_17.time_start
  • Sort Method: top-N heapsort Memory: 25kB
126. 0.418 399.740 ↓ 108.0 108 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=19.387..399.740 rows=108 loops=1)

  • One-Time Filter: (1 <> $17)
127. 399.322 399.322 ↓ 108.0 108 1

Index Scan using cards_history_pkey on cards_history a_17 (cost=0.56..141.27 rows=1 width=50) (actual time=19.327..399.322 rows=108 loops=1)

  • Index Cond: (((card_number)::text = '0245922734'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 13
128. 0.003 375.891 ↑ 1.0 1 1

Subquery Scan on *SELECT* 19 (cost=149.71..149.73 rows=1 width=38) (actual time=375.889..375.891 rows=1 loops=1)

129. 0.000 375.888 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=375.887..375.888 rows=1 loops=1)

130.          

Initplan (for Limit)

131. 0.085 0.085 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_18 (cost=0.42..8.44 rows=1 width=2) (actual time=0.084..0.085 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0246939038'::text)
132. 0.474 375.884 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=375.884..375.884 rows=1 loops=1)

  • Sort Key: a_18.date_start, a_18.time_start
  • Sort Method: top-N heapsort Memory: 25kB
133. 0.337 375.410 ↓ 92.0 92 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=34.901..375.410 rows=92 loops=1)

  • One-Time Filter: (1 <> $18)
134. 375.073 375.073 ↓ 92.0 92 1

Index Scan using cards_history_pkey on cards_history a_18 (cost=0.56..141.27 rows=1 width=50) (actual time=34.800..375.073 rows=92 loops=1)

  • Index Cond: (((card_number)::text = '0246939038'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 20
135. 0.004 400.582 ↑ 1.0 1 1

Subquery Scan on *SELECT* 20 (cost=149.71..149.73 rows=1 width=38) (actual time=400.580..400.582 rows=1 loops=1)

136. 0.000 400.578 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=400.577..400.578 rows=1 loops=1)

137.          

Initplan (for Limit)

138. 0.085 0.085 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_19 (cost=0.42..8.44 rows=1 width=2) (actual time=0.083..0.085 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0247364526'::text)
139. 0.630 400.574 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=400.574..400.574 rows=1 loops=1)

  • Sort Key: a_19.date_start, a_19.time_start
  • Sort Method: top-N heapsort Memory: 25kB
140. 0.423 399.944 ↓ 86.0 86 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=24.906..399.944 rows=86 loops=1)

  • One-Time Filter: (1 <> $19)
141. 399.521 399.521 ↓ 86.0 86 1

Index Scan using cards_history_pkey on cards_history a_19 (cost=0.56..141.27 rows=1 width=50) (actual time=24.805..399.521 rows=86 loops=1)

  • Index Cond: (((card_number)::text = '0247364526'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 8
142. 0.003 198.867 ↑ 1.0 1 1

Subquery Scan on *SELECT* 21 (cost=149.71..149.73 rows=1 width=38) (actual time=198.865..198.867 rows=1 loops=1)

143. 0.000 198.864 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=198.863..198.864 rows=1 loops=1)

144.          

Initplan (for Limit)

145. 0.079 0.079 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_20 (cost=0.42..8.44 rows=1 width=2) (actual time=0.078..0.079 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0247528606'::text)
146. 0.384 198.861 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=198.861..198.861 rows=1 loops=1)

  • Sort Key: a_20.date_start, a_20.time_start
  • Sort Method: top-N heapsort Memory: 25kB
147. 0.265 198.477 ↓ 62.0 62 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=14.051..198.477 rows=62 loops=1)

  • One-Time Filter: (1 <> $20)
148. 198.212 198.212 ↓ 62.0 62 1

Index Scan using cards_history_pkey on cards_history a_20 (cost=0.56..141.27 rows=1 width=50) (actual time=13.957..198.212 rows=62 loops=1)

  • Index Cond: (((card_number)::text = '0247528606'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 10
149. 0.004 308.690 ↑ 1.0 1 1

Subquery Scan on *SELECT* 22 (cost=149.71..149.73 rows=1 width=38) (actual time=308.687..308.690 rows=1 loops=1)

150. 0.000 308.686 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=308.685..308.686 rows=1 loops=1)

151.          

Initplan (for Limit)

152. 0.066 0.066 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_21 (cost=0.42..8.44 rows=1 width=2) (actual time=0.065..0.066 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0248104622'::text)
153. 0.417 308.682 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=308.682..308.682 rows=1 loops=1)

  • Sort Key: a_21.date_start, a_21.time_start
  • Sort Method: top-N heapsort Memory: 25kB
154. 0.287 308.265 ↓ 65.0 65 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=10.596..308.265 rows=65 loops=1)

  • One-Time Filter: (1 <> $21)
155. 307.978 307.978 ↓ 65.0 65 1

Index Scan using cards_history_pkey on cards_history a_21 (cost=0.56..141.27 rows=1 width=50) (actual time=10.516..307.978 rows=65 loops=1)

  • Index Cond: (((card_number)::text = '0248104622'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 16
156. 0.002 85.121 ↑ 1.0 1 1

Subquery Scan on *SELECT* 23 (cost=149.71..149.73 rows=1 width=38) (actual time=85.120..85.121 rows=1 loops=1)

157. 0.000 85.119 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=85.118..85.119 rows=1 loops=1)

158.          

Initplan (for Limit)

159. 0.147 0.147 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_22 (cost=0.42..8.44 rows=1 width=2) (actual time=0.145..0.147 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0248122798'::text)
160. 0.205 85.116 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=85.116..85.116 rows=1 loops=1)

  • Sort Key: a_22.date_start, a_22.time_start
  • Sort Method: top-N heapsort Memory: 25kB
161. 0.246 84.911 ↓ 31.0 31 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=10.452..84.911 rows=31 loops=1)

  • One-Time Filter: (1 <> $22)
162. 84.665 84.665 ↓ 31.0 31 1

Index Scan using cards_history_pkey on cards_history a_22 (cost=0.56..141.27 rows=1 width=50) (actual time=10.289..84.665 rows=31 loops=1)

  • Index Cond: (((card_number)::text = '0248122798'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 12
163. 0.003 491.958 ↑ 1.0 1 1

Subquery Scan on *SELECT* 24 (cost=149.71..149.73 rows=1 width=38) (actual time=491.956..491.958 rows=1 loops=1)

164. 0.000 491.955 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=491.953..491.955 rows=1 loops=1)

165.          

Initplan (for Limit)

166. 0.061 0.061 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_23 (cost=0.42..8.44 rows=1 width=2) (actual time=0.060..0.061 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0248245422'::text)
167. 0.669 491.951 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=491.951..491.951 rows=1 loops=1)

  • Sort Key: a_23.date_start, a_23.time_start
  • Sort Method: top-N heapsort Memory: 25kB
168. 0.427 491.282 ↓ 100.0 100 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=14.198..491.282 rows=100 loops=1)

  • One-Time Filter: (1 <> $23)
169. 490.855 490.855 ↓ 100.0 100 1

Index Scan using cards_history_pkey on cards_history a_23 (cost=0.56..141.27 rows=1 width=50) (actual time=14.124..490.855 rows=100 loops=1)

  • Index Cond: (((card_number)::text = '0248245422'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 15
170. 0.001 28.804 ↑ 1.0 1 1

Subquery Scan on *SELECT* 25 (cost=149.71..149.73 rows=1 width=38) (actual time=28.802..28.804 rows=1 loops=1)

171. 0.000 28.803 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=28.801..28.803 rows=1 loops=1)

172.          

Initplan (for Limit)

173. 0.075 0.075 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_24 (cost=0.42..8.44 rows=1 width=2) (actual time=0.073..0.075 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0248399534'::text)
174. 0.118 28.797 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=28.797..28.797 rows=1 loops=1)

  • Sort Key: a_24.date_start, a_24.time_start
  • Sort Method: top-N heapsort Memory: 25kB
175. 0.129 28.679 ↓ 22.0 22 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=1.260..28.679 rows=22 loops=1)

  • One-Time Filter: (1 <> $24)
176. 28.550 28.550 ↓ 22.0 22 1

Index Scan using cards_history_pkey on cards_history a_24 (cost=0.56..141.27 rows=1 width=50) (actual time=1.169..28.550 rows=22 loops=1)

  • Index Cond: (((card_number)::text = '0248399534'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 2
177. 0.004 440.855 ↑ 1.0 1 1

Subquery Scan on *SELECT* 26 (cost=149.71..149.73 rows=1 width=38) (actual time=440.853..440.855 rows=1 loops=1)

178. 0.000 440.851 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=440.850..440.851 rows=1 loops=1)

179.          

Initplan (for Limit)

180. 0.072 0.072 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_25 (cost=0.42..8.44 rows=1 width=2) (actual time=0.071..0.072 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0249109934'::text)
181. 0.608 440.847 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=440.847..440.847 rows=1 loops=1)

  • Sort Key: a_25.date_start, a_25.time_start
  • Sort Method: top-N heapsort Memory: 25kB
182. 0.394 440.239 ↓ 104.0 104 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=24.894..440.239 rows=104 loops=1)

  • One-Time Filter: (1 <> $25)
183. 439.845 439.845 ↓ 104.0 104 1

Index Scan using cards_history_pkey on cards_history a_25 (cost=0.56..141.27 rows=1 width=50) (actual time=24.806..439.845 rows=104 loops=1)

  • Index Cond: (((card_number)::text = '0249109934'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 9
184. 0.003 299.590 ↑ 1.0 1 1

Subquery Scan on *SELECT* 27 (cost=149.71..149.73 rows=1 width=38) (actual time=299.589..299.590 rows=1 loops=1)

185. 0.000 299.587 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=299.586..299.587 rows=1 loops=1)

186.          

Initplan (for Limit)

187. 0.210 0.210 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_26 (cost=0.42..8.44 rows=1 width=2) (actual time=0.209..0.210 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0249530798'::text)
188. 0.455 299.582 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=299.582..299.582 rows=1 loops=1)

  • Sort Key: a_26.date_start, a_26.time_start
  • Sort Method: top-N heapsort Memory: 25kB
189. 0.460 299.127 ↓ 81.0 81 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=15.237..299.127 rows=81 loops=1)

  • One-Time Filter: (1 <> $26)
190. 298.667 298.667 ↓ 81.0 81 1

Index Scan using cards_history_pkey on cards_history a_26 (cost=0.56..141.27 rows=1 width=50) (actual time=15.010..298.667 rows=81 loops=1)

  • Index Cond: (((card_number)::text = '0249530798'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 18
191. 0.004 482.394 ↑ 1.0 1 1

Subquery Scan on *SELECT* 28 (cost=149.71..149.73 rows=1 width=38) (actual time=482.392..482.394 rows=1 loops=1)

192. 0.000 482.390 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=482.389..482.390 rows=1 loops=1)

193.          

Initplan (for Limit)

194. 0.079 0.079 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_27 (cost=0.42..8.44 rows=1 width=2) (actual time=0.078..0.079 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0249617326'::text)
195. 0.781 482.387 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=482.387..482.387 rows=1 loops=1)

  • Sort Key: a_27.date_start, a_27.time_start
  • Sort Method: top-N heapsort Memory: 25kB
196. 0.508 481.606 ↓ 136.0 136 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=10.635..481.606 rows=136 loops=1)

  • One-Time Filter: (1 <> $27)
197. 481.098 481.098 ↓ 136.0 136 1

Index Scan using cards_history_pkey on cards_history a_27 (cost=0.56..141.27 rows=1 width=50) (actual time=10.541..481.098 rows=136 loops=1)

  • Index Cond: (((card_number)::text = '0249617326'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 23
198. 0.004 749.085 ↑ 1.0 1 1

Subquery Scan on *SELECT* 29 (cost=149.71..149.73 rows=1 width=38) (actual time=749.083..749.085 rows=1 loops=1)

199. 0.000 749.081 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=749.080..749.081 rows=1 loops=1)

200.          

Initplan (for Limit)

201. 0.086 0.086 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_28 (cost=0.42..8.44 rows=1 width=2) (actual time=0.084..0.086 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0249679278'::text)
202. 1.300 749.077 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=749.077..749.077 rows=1 loops=1)

  • Sort Key: a_28.date_start, a_28.time_start
  • Sort Method: top-N heapsort Memory: 25kB
203. 0.802 747.777 ↓ 168.0 168 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=22.173..747.777 rows=168 loops=1)

  • One-Time Filter: (1 <> $28)
204. 746.975 746.975 ↓ 168.0 168 1

Index Scan using cards_history_pkey on cards_history a_28 (cost=0.56..141.27 rows=1 width=50) (actual time=22.071..746.975 rows=168 loops=1)

  • Index Cond: (((card_number)::text = '0249679278'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 3
205. 0.002 446.578 ↑ 1.0 1 1

Subquery Scan on *SELECT* 30 (cost=149.71..149.73 rows=1 width=38) (actual time=446.576..446.578 rows=1 loops=1)

206. 0.000 446.576 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=446.575..446.576 rows=1 loops=1)

207.          

Initplan (for Limit)

208. 0.075 0.075 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_29 (cost=0.42..8.44 rows=1 width=2) (actual time=0.073..0.075 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0249844654'::text)
209. 0.689 446.571 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=446.571..446.571 rows=1 loops=1)

  • Sort Key: a_29.date_start, a_29.time_start
  • Sort Method: top-N heapsort Memory: 25kB
210. 0.445 445.882 ↓ 113.0 113 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=20.248..445.882 rows=113 loops=1)

  • One-Time Filter: (1 <> $29)
211. 445.437 445.437 ↓ 113.0 113 1

Index Scan using cards_history_pkey on cards_history a_29 (cost=0.56..141.27 rows=1 width=50) (actual time=20.156..445.437 rows=113 loops=1)

  • Index Cond: (((card_number)::text = '0249844654'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 13
212. 0.003 484.985 ↑ 1.0 1 1

Subquery Scan on *SELECT* 31 (cost=149.71..149.73 rows=1 width=38) (actual time=484.983..484.985 rows=1 loops=1)

213. 0.000 484.982 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=484.981..484.982 rows=1 loops=1)

214.          

Initplan (for Limit)

215. 0.068 0.068 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_30 (cost=0.42..8.44 rows=1 width=2) (actual time=0.067..0.068 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0250439086'::text)
216. 0.851 484.978 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=484.978..484.978 rows=1 loops=1)

  • Sort Key: a_30.date_start, a_30.time_start
  • Sort Method: top-N heapsort Memory: 25kB
217. 0.552 484.127 ↓ 165.0 165 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=17.707..484.127 rows=165 loops=1)

  • One-Time Filter: (1 <> $30)
218. 483.575 483.575 ↓ 165.0 165 1

Index Scan using cards_history_pkey on cards_history a_30 (cost=0.56..141.27 rows=1 width=50) (actual time=17.626..483.575 rows=165 loops=1)

  • Index Cond: (((card_number)::text = '0250439086'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 22
219. 0.005 321.050 ↑ 1.0 1 1

Subquery Scan on *SELECT* 32 (cost=149.71..149.73 rows=1 width=38) (actual time=321.048..321.050 rows=1 loops=1)

220. 0.000 321.045 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=321.045..321.045 rows=1 loops=1)

221.          

Initplan (for Limit)

222. 0.058 0.058 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_31 (cost=0.42..8.44 rows=1 width=2) (actual time=0.057..0.058 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0250913966'::text)
223. 0.483 321.043 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=321.043..321.043 rows=1 loops=1)

  • Sort Key: a_31.date_start, a_31.time_start
  • Sort Method: top-N heapsort Memory: 25kB
224. 0.357 320.560 ↓ 82.0 82 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=19.918..320.560 rows=82 loops=1)

  • One-Time Filter: (1 <> $31)
225. 320.203 320.203 ↓ 82.0 82 1

Index Scan using cards_history_pkey on cards_history a_31 (cost=0.56..141.27 rows=1 width=50) (actual time=19.846..320.203 rows=82 loops=1)

  • Index Cond: (((card_number)::text = '0250913966'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 13
226. 0.005 471.064 ↑ 1.0 1 1

Subquery Scan on *SELECT* 33 (cost=149.71..149.73 rows=1 width=38) (actual time=471.062..471.064 rows=1 loops=1)

227. 0.000 471.059 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=471.059..471.059 rows=1 loops=1)

228.          

Initplan (for Limit)

229. 0.067 0.067 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_32 (cost=0.42..8.44 rows=1 width=2) (actual time=0.066..0.067 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0251184814'::text)
230. 0.653 471.057 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=471.057..471.057 rows=1 loops=1)

  • Sort Key: a_32.date_start, a_32.time_start
  • Sort Method: top-N heapsort Memory: 25kB
231. 0.441 470.404 ↓ 115.0 115 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=15.228..470.404 rows=115 loops=1)

  • One-Time Filter: (1 <> $32)
232. 469.963 469.963 ↓ 115.0 115 1

Index Scan using cards_history_pkey on cards_history a_32 (cost=0.56..141.27 rows=1 width=50) (actual time=15.147..469.963 rows=115 loops=1)

  • Index Cond: (((card_number)::text = '0251184814'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 30
233. 0.004 12.482 ↑ 1.0 1 1

Subquery Scan on *SELECT* 34 (cost=149.71..149.73 rows=1 width=38) (actual time=12.480..12.482 rows=1 loops=1)

234. 0.000 12.478 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=12.477..12.478 rows=1 loops=1)

235.          

Initplan (for Limit)

236. 0.083 0.083 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_33 (cost=0.42..8.44 rows=1 width=2) (actual time=0.082..0.083 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0251648174'::text)
237. 0.087 12.474 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=12.474..12.474 rows=1 loops=1)

  • Sort Key: a_33.date_start, a_33.time_start
  • Sort Method: top-N heapsort Memory: 25kB
238. 0.114 12.387 ↓ 14.0 14 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=12.171..12.387 rows=14 loops=1)

  • One-Time Filter: (1 <> $33)
239. 12.273 12.273 ↓ 14.0 14 1

Index Scan using cards_history_pkey on cards_history a_33 (cost=0.56..141.27 rows=1 width=50) (actual time=12.072..12.273 rows=14 loops=1)

  • Index Cond: (((card_number)::text = '0251648174'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
240. 0.006 45.582 ↑ 1.0 1 1

Subquery Scan on *SELECT* 35 (cost=149.71..149.73 rows=1 width=38) (actual time=45.579..45.582 rows=1 loops=1)

241. 0.000 45.576 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=45.575..45.576 rows=1 loops=1)

242.          

Initplan (for Limit)

243. 8.235 8.235 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_34 (cost=0.42..8.44 rows=1 width=2) (actual time=8.231..8.235 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0575373125'::text)
244. 0.090 45.572 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=45.572..45.572 rows=1 loops=1)

  • Sort Key: a_34.date_start, a_34.time_start
  • Sort Method: quicksort Memory: 25kB
245. 8.259 45.482 ↑ 1.0 1 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=44.960..45.482 rows=1 loops=1)

  • One-Time Filter: (1 <> $34)
246. 37.223 37.223 ↑ 1.0 1 1

Index Scan using cards_history_pkey on cards_history a_34 (cost=0.56..141.27 rows=1 width=50) (actual time=36.705..37.223 rows=1 loops=1)

  • Index Cond: (((card_number)::text = '0575373125'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
247. 0.003 8.936 ↑ 1.0 1 1

Subquery Scan on *SELECT* 36 (cost=149.71..149.73 rows=1 width=38) (actual time=8.934..8.936 rows=1 loops=1)

248. 0.000 8.933 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=8.932..8.933 rows=1 loops=1)

249.          

Initplan (for Limit)

250. 0.596 0.596 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_35 (cost=0.42..8.44 rows=1 width=2) (actual time=0.591..0.596 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0577052501'::text)
251. 0.099 8.929 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=8.929..8.929 rows=1 loops=1)

  • Sort Key: a_35.date_start, a_35.time_start
  • Sort Method: top-N heapsort Memory: 25kB
252. 0.637 8.830 ↓ 14.0 14 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=1.978..8.830 rows=14 loops=1)

  • One-Time Filter: (1 <> $35)
253. 8.193 8.193 ↓ 14.0 14 1

Index Scan using cards_history_pkey on cards_history a_35 (cost=0.56..141.27 rows=1 width=50) (actual time=1.357..8.193 rows=14 loops=1)

  • Index Cond: (((card_number)::text = '0577052501'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
254. 0.002 1.941 ↑ 1.0 1 1

Subquery Scan on *SELECT* 37 (cost=149.71..149.73 rows=1 width=38) (actual time=1.940..1.941 rows=1 loops=1)

255. 0.000 1.939 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=1.938..1.939 rows=1 loops=1)

256.          

Initplan (for Limit)

257. 0.786 0.786 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_36 (cost=0.42..8.44 rows=1 width=2) (actual time=0.783..0.786 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0582687317'::text)
258. 0.053 1.935 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=1.935..1.935 rows=1 loops=1)

  • Sort Key: a_36.date_start, a_36.time_start
  • Sort Method: quicksort Memory: 25kB
259. 0.807 1.882 ↑ 1.0 1 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=1.877..1.882 rows=1 loops=1)

  • One-Time Filter: (1 <> $36)
260. 1.075 1.075 ↑ 1.0 1 1

Index Scan using cards_history_pkey on cards_history a_36 (cost=0.56..141.27 rows=1 width=50) (actual time=1.071..1.075 rows=1 loops=1)

  • Index Cond: (((card_number)::text = '0582687317'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
261. 0.001 21.995 ↑ 1.0 1 1

Subquery Scan on *SELECT* 38 (cost=149.71..149.73 rows=1 width=38) (actual time=21.994..21.995 rows=1 loops=1)

262. 0.000 21.994 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=21.993..21.994 rows=1 loops=1)

263.          

Initplan (for Limit)

264. 0.052 0.052 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_37 (cost=0.42..8.44 rows=1 width=2) (actual time=0.052..0.052 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0586463541'::text)
265. 0.104 21.990 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=21.990..21.990 rows=1 loops=1)

  • Sort Key: a_37.date_start, a_37.time_start
  • Sort Method: top-N heapsort Memory: 25kB
266. 0.091 21.886 ↓ 15.0 15 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=2.868..21.886 rows=15 loops=1)

  • One-Time Filter: (1 <> $37)
267. 21.795 21.795 ↓ 15.0 15 1

Index Scan using cards_history_pkey on cards_history a_37 (cost=0.56..141.27 rows=1 width=50) (actual time=2.806..21.795 rows=15 loops=1)

  • Index Cond: (((card_number)::text = '0586463541'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
268. 0.003 36.766 ↑ 1.0 1 1

Subquery Scan on *SELECT* 39 (cost=149.71..149.73 rows=1 width=38) (actual time=36.764..36.766 rows=1 loops=1)

269. 0.000 36.763 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=36.762..36.763 rows=1 loops=1)

270.          

Initplan (for Limit)

271. 0.028 0.028 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_38 (cost=0.42..8.44 rows=1 width=2) (actual time=0.027..0.028 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0586855733'::text)
272. 0.127 36.760 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=36.760..36.760 rows=1 loops=1)

  • Sort Key: a_38.date_start, a_38.time_start
  • Sort Method: top-N heapsort Memory: 25kB
273. 0.083 36.633 ↓ 15.0 15 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=5.566..36.633 rows=15 loops=1)

  • One-Time Filter: (1 <> $38)
274. 36.550 36.550 ↓ 15.0 15 1

Index Scan using cards_history_pkey on cards_history a_38 (cost=0.56..141.27 rows=1 width=50) (actual time=5.528..36.550 rows=15 loops=1)

  • Index Cond: (((card_number)::text = '0586855733'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
275. 0.005 532.000 ↑ 1.0 1 1

Subquery Scan on *SELECT* 40 (cost=149.71..149.73 rows=1 width=38) (actual time=531.997..532.000 rows=1 loops=1)

276. 0.000 531.995 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=531.994..531.995 rows=1 loops=1)

277.          

Initplan (for Limit)

278. 0.566 0.566 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_39 (cost=0.42..8.44 rows=1 width=2) (actual time=0.562..0.566 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881710300'::text)
279. 0.690 531.992 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=531.992..531.992 rows=1 loops=1)

  • Sort Key: a_39.date_start, a_39.time_start
  • Sort Method: top-N heapsort Memory: 25kB
280. 0.998 531.302 ↓ 91.0 91 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=27.757..531.302 rows=91 loops=1)

  • One-Time Filter: (1 <> $39)
281. 530.304 530.304 ↓ 91.0 91 1

Index Scan using cards_history_pkey on cards_history a_39 (cost=0.56..141.27 rows=1 width=50) (actual time=27.168..530.304 rows=91 loops=1)

  • Index Cond: (((card_number)::text = '0881710300'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 26
282. 0.004 509.497 ↑ 1.0 1 1

Subquery Scan on *SELECT* 41 (cost=149.71..149.73 rows=1 width=38) (actual time=509.495..509.497 rows=1 loops=1)

283. 0.000 509.493 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=509.492..509.493 rows=1 loops=1)

284.          

Initplan (for Limit)

285. 0.077 0.077 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_40 (cost=0.42..8.44 rows=1 width=2) (actual time=0.076..0.077 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881710439'::text)
286. 0.850 509.490 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=509.490..509.490 rows=1 loops=1)

  • Sort Key: a_40.date_start, a_40.time_start
  • Sort Method: top-N heapsort Memory: 25kB
287. 0.558 508.640 ↓ 102.0 102 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=12.160..508.640 rows=102 loops=1)

  • One-Time Filter: (1 <> $40)
288. 508.082 508.082 ↓ 102.0 102 1

Index Scan using cards_history_pkey on cards_history a_40 (cost=0.56..141.27 rows=1 width=50) (actual time=12.067..508.082 rows=102 loops=1)

  • Index Cond: (((card_number)::text = '0881710439'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 8
289. 0.004 685.098 ↑ 1.0 1 1

Subquery Scan on *SELECT* 42 (cost=149.71..149.73 rows=1 width=38) (actual time=685.096..685.098 rows=1 loops=1)

290. 0.000 685.094 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=685.093..685.094 rows=1 loops=1)

291.          

Initplan (for Limit)

292. 0.077 0.077 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_41 (cost=0.42..8.44 rows=1 width=2) (actual time=0.076..0.077 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881711494'::text)
293. 0.936 685.089 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=685.089..685.089 rows=1 loops=1)

  • Sort Key: a_41.date_start, a_41.time_start
  • Sort Method: top-N heapsort Memory: 25kB
294. 0.594 684.153 ↓ 115.0 115 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=26.737..684.153 rows=115 loops=1)

  • One-Time Filter: (1 <> $41)
295. 683.559 683.559 ↓ 115.0 115 1

Index Scan using cards_history_pkey on cards_history a_41 (cost=0.56..141.27 rows=1 width=50) (actual time=26.645..683.559 rows=115 loops=1)

  • Index Cond: (((card_number)::text = '0881711494'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 15
296. 0.004 1,385.379 ↑ 1.0 1 1

Subquery Scan on *SELECT* 43 (cost=149.71..149.73 rows=1 width=38) (actual time=1,385.377..1,385.379 rows=1 loops=1)

297. 0.000 1,385.375 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=1,385.375..1,385.375 rows=1 loops=1)

298.          

Initplan (for Limit)

299. 8.102 8.102 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_42 (cost=0.42..8.44 rows=1 width=2) (actual time=8.098..8.102 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881714307'::text)
300. 2.262 1,385.372 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=1,385.372..1,385.372 rows=1 loops=1)

  • Sort Key: a_42.date_start, a_42.time_start
  • Sort Method: top-N heapsort Memory: 25kB
301. 9.542 1,383.110 ↓ 262.0 262 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=32.331..1,383.110 rows=262 loops=1)

  • One-Time Filter: (1 <> $42)
302. 1,373.568 1,373.568 ↓ 262.0 262 1

Index Scan using cards_history_pkey on cards_history a_42 (cost=0.56..141.27 rows=1 width=50) (actual time=24.207..1,373.568 rows=262 loops=1)

  • Index Cond: (((card_number)::text = '0881714307'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 12
303. 0.004 855.118 ↑ 1.0 1 1

Subquery Scan on *SELECT* 44 (cost=149.71..149.73 rows=1 width=38) (actual time=855.116..855.118 rows=1 loops=1)

304. 0.000 855.114 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=855.113..855.114 rows=1 loops=1)

305.          

Initplan (for Limit)

306. 0.083 0.083 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_43 (cost=0.42..8.44 rows=1 width=2) (actual time=0.082..0.083 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881714372'::text)
307. 1.359 855.110 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=855.110..855.110 rows=1 loops=1)

  • Sort Key: a_43.date_start, a_43.time_start
  • Sort Method: top-N heapsort Memory: 25kB
308. 0.813 853.751 ↓ 196.0 196 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=12.255..853.751 rows=196 loops=1)

  • One-Time Filter: (1 <> $43)
309. 852.938 852.938 ↓ 196.0 196 1

Index Scan using cards_history_pkey on cards_history a_43 (cost=0.56..141.27 rows=1 width=50) (actual time=12.156..852.938 rows=196 loops=1)

  • Index Cond: (((card_number)::text = '0881714372'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 19
310. 0.002 693.548 ↑ 1.0 1 1

Subquery Scan on *SELECT* 45 (cost=149.71..149.73 rows=1 width=38) (actual time=693.546..693.548 rows=1 loops=1)

311. 0.000 693.546 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=693.545..693.546 rows=1 loops=1)

312.          

Initplan (for Limit)

313. 0.078 0.078 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_44 (cost=0.42..8.44 rows=1 width=2) (actual time=0.077..0.078 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881714982'::text)
314. 1.149 693.541 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=693.541..693.541 rows=1 loops=1)

  • Sort Key: a_44.date_start, a_44.time_start
  • Sort Method: top-N heapsort Memory: 25kB
315. 0.724 692.392 ↓ 161.0 161 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=31.220..692.392 rows=161 loops=1)

  • One-Time Filter: (1 <> $44)
316. 691.668 691.668 ↓ 161.0 161 1

Index Scan using cards_history_pkey on cards_history a_44 (cost=0.56..141.27 rows=1 width=50) (actual time=31.127..691.668 rows=161 loops=1)

  • Index Cond: (((card_number)::text = '0881714982'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 10
317. 0.004 285.947 ↑ 1.0 1 1

Subquery Scan on *SELECT* 46 (cost=149.71..149.73 rows=1 width=38) (actual time=285.945..285.947 rows=1 loops=1)

318. 0.000 285.943 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=285.942..285.943 rows=1 loops=1)

319.          

Initplan (for Limit)

320. 0.079 0.079 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_45 (cost=0.42..8.44 rows=1 width=2) (actual time=0.078..0.079 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881716096'::text)
321. 0.363 285.940 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=285.940..285.940 rows=1 loops=1)

  • Sort Key: a_45.date_start, a_45.time_start
  • Sort Method: top-N heapsort Memory: 25kB
322. 0.286 285.577 ↓ 73.0 73 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=24.410..285.577 rows=73 loops=1)

  • One-Time Filter: (1 <> $45)
323. 285.291 285.291 ↓ 73.0 73 1

Index Scan using cards_history_pkey on cards_history a_45 (cost=0.56..141.27 rows=1 width=50) (actual time=24.317..285.291 rows=73 loops=1)

  • Index Cond: (((card_number)::text = '0881716096'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 25
324. 0.003 354.571 ↑ 1.0 1 1

Subquery Scan on *SELECT* 47 (cost=149.71..149.73 rows=1 width=38) (actual time=354.569..354.571 rows=1 loops=1)

325. 0.000 354.568 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=354.567..354.568 rows=1 loops=1)

326.          

Initplan (for Limit)

327. 0.079 0.079 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_46 (cost=0.42..8.44 rows=1 width=2) (actual time=0.077..0.079 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881716493'::text)
328. 0.504 354.564 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=354.564..354.564 rows=1 loops=1)

  • Sort Key: a_46.date_start, a_46.time_start
  • Sort Method: top-N heapsort Memory: 25kB
329. 0.420 354.060 ↓ 82.0 82 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=25.800..354.060 rows=82 loops=1)

  • One-Time Filter: (1 <> $46)
330. 353.640 353.640 ↓ 82.0 82 1

Index Scan using cards_history_pkey on cards_history a_46 (cost=0.56..141.27 rows=1 width=50) (actual time=25.705..353.640 rows=82 loops=1)

  • Index Cond: (((card_number)::text = '0881716493'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 15
331. 0.003 260.901 ↑ 1.0 1 1

Subquery Scan on *SELECT* 48 (cost=149.71..149.73 rows=1 width=38) (actual time=260.899..260.901 rows=1 loops=1)

332. 0.000 260.898 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=260.897..260.898 rows=1 loops=1)

333.          

Initplan (for Limit)

334. 0.082 0.082 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_47 (cost=0.42..8.44 rows=1 width=2) (actual time=0.080..0.082 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881717812'::text)
335. 0.436 260.894 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=260.894..260.894 rows=1 loops=1)

  • Sort Key: a_47.date_start, a_47.time_start
  • Sort Method: top-N heapsort Memory: 25kB
336. 0.303 260.458 ↓ 79.0 79 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=11.390..260.458 rows=79 loops=1)

  • One-Time Filter: (1 <> $47)
337. 260.155 260.155 ↓ 79.0 79 1

Index Scan using cards_history_pkey on cards_history a_47 (cost=0.56..141.27 rows=1 width=50) (actual time=11.293..260.155 rows=79 loops=1)

  • Index Cond: (((card_number)::text = '0881717812'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 20
338. 0.003 103.115 ↑ 1.0 1 1

Subquery Scan on *SELECT* 49 (cost=149.71..149.73 rows=1 width=38) (actual time=103.113..103.115 rows=1 loops=1)

339. 0.000 103.112 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=103.111..103.112 rows=1 loops=1)

340.          

Initplan (for Limit)

341. 0.179 0.179 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_48 (cost=0.42..8.44 rows=1 width=2) (actual time=0.177..0.179 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881720300'::text)
342. 0.215 103.108 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=103.108..103.108 rows=1 loops=1)

  • Sort Key: a_48.date_start, a_48.time_start
  • Sort Method: top-N heapsort Memory: 25kB
343. 0.301 102.893 ↓ 38.0 38 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=18.103..102.893 rows=38 loops=1)

  • One-Time Filter: (1 <> $48)
344. 102.592 102.592 ↓ 38.0 38 1

Index Scan using cards_history_pkey on cards_history a_48 (cost=0.56..141.27 rows=1 width=50) (actual time=17.908..102.592 rows=38 loops=1)

  • Index Cond: (((card_number)::text = '0881720300'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 1
345. 0.002 209.577 ↑ 1.0 1 1

Subquery Scan on *SELECT* 50 (cost=149.71..149.73 rows=1 width=38) (actual time=209.576..209.577 rows=1 loops=1)

346. 0.000 209.575 ↑ 1.0 1 1

Limit (cost=149.71..149.72 rows=1 width=50) (actual time=209.574..209.575 rows=1 loops=1)

347.          

Initplan (for Limit)

348. 0.055 0.055 ↑ 1.0 1 1

Index Scan using cards_card_number_idx on cards cards_49 (cost=0.42..8.44 rows=1 width=2) (actual time=0.054..0.055 rows=1 loops=1)

  • Index Cond: ((card_number)::text = '0881720972'::text)
349. 0.318 209.571 ↑ 1.0 1 1

Sort (cost=141.28..141.28 rows=1 width=50) (actual time=209.571..209.571 rows=1 loops=1)

  • Sort Key: a_49.date_start, a_49.time_start
  • Sort Method: top-N heapsort Memory: 25kB
350. 0.244 209.253 ↓ 66.0 66 1

Result (cost=0.56..141.27 rows=1 width=50) (actual time=23.352..209.253 rows=66 loops=1)

  • One-Time Filter: (1 <> $49)
351. 209.009 209.009 ↓ 66.0 66 1

Index Scan using cards_history_pkey on cards_history a_49 (cost=0.56..141.27 rows=1 width=50) (actual time=23.282..209.009 rows=66 loops=1)

  • Index Cond: (((card_number)::text = '0881720972'::text) AND (action = 1) AND (date_start < now()))
  • Filter: ((state = 2) AND ((customer_id)::text = 'КЭМКТ00357'::text))
  • Rows Removed by Filter: 14
Planning time : 108.707 ms