saza-ku / isucon13

0 stars 0 forks source link

11250807 #91

Open saza-ku opened 1 year ago

saza-ku commented 1 year ago

isucon1

alp

+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| COUNT | METHOD |                   URI                    |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| 31282 | GET    | /api/user/.+/icon                        | 0.004 | 0.064 | 151.548 | 0.005 | 0.028 |
| 3510  | POST   | /api/livestream/.+/livecomment           | 0.004 | 0.100 | 100.268 | 0.029 | 0.068 |
| 3410  | GET    | /api/livestream/.+/livecomment           | 0.004 | 0.092 | 92.808  | 0.027 | 0.064 |
| 3444  | GET    | /api/livestream/.+/reaction              | 0.004 | 0.100 | 89.952  | 0.026 | 0.064 |
| 3128  | POST   | /api/livestream/.+/reaction              | 0.004 | 0.088 | 78.676  | 0.025 | 0.064 |
| 1333  | GET    | /api/livestream/search                   | 0.004 | 0.108 | 63.800  | 0.048 | 0.084 |
| 543   | POST   | /api/register                            | 0.004 | 0.164 | 57.860  | 0.107 | 0.156 |
| 516   | POST   | /api/livestream/reservation              | 0.020 | 0.116 | 30.668  | 0.059 | 0.108 |
| 640   | GET    | /api/livestream                          | 0.004 | 0.140 | 26.528  | 0.041 | 0.112 |
| 805   | POST   | /api/livestream/.+/moderate              | 0.004 | 0.080 | 20.088  | 0.025 | 0.056 |
| 1693  | GET    | /api/livestream/.+/report                | 0.004 | 0.056 | 17.948  | 0.011 | 0.040 |
| 1257  | GET    | /api/livestream/.+/ngwords               | 0.004 | 0.060 | 12.336  | 0.010 | 0.036 |
| 582   | POST   | /api/icon                                | 0.004 | 0.060 | 9.864   | 0.017 | 0.048 |
| 547   | POST   | /api/login                               | 0.004 | 0.064 | 6.012   | 0.011 | 0.040 |
| 523   | GET    | /api/tag                                 | 0.000 | 0.072 | 5.724   | 0.011 | 0.036 |
| 297   | POST   | /api/livestream/.+/enter                 | 0.004 | 0.056 | 3.728   | 0.013 | 0.044 |
| 33    | GET    | /api/user/.+/statistics                  | 0.024 | 0.148 | 3.368   | 0.102 | 0.148 |
| 287   | DELETE | /api/livestream/.+/exit                  | 0.008 | 0.056 | 3.052   | 0.011 | 0.040 |
| 31    | GET    | /api/user/.+/livestream                  | 0.036 | 0.184 | 2.332   | 0.075 | 0.184 |
| 22    | GET    | /api/livestream/.+/statistics            | 0.024 | 0.116 | 2.000   | 0.091 | 0.116 |
| 58    | POST   | /api/livestream/.+/livecomment/.+/report | 0.004 | 0.064 | 1.780   | 0.031 | 0.064 |
| 32    | GET    | /api/user/.+/theme                       | 0.004 | 0.060 | 0.452   | 0.014 | 0.060 |
| 5     | GET    | /api/user/.+                             | 0.000 | 0.004 | 0.004   | 0.001 | 0.004 |
| 1     | GET    | /api/payment                             | 0.004 | 0.004 | 0.004   | 0.004 | 0.004 |
| 1     | GET    | /api/livestream/.+                       | 0.000 | 0.000 | 0.000   | 0.000 | 0.000 |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+

slow query

explain

Reading from STDIN ...

# No events processed.

netdata

http://localhost:19991/#menu_services;after=1700899667649;before=1700899743660

pprof

go tool pprof -http=0.0.0.0:1080 http://isucon1/pprof/11250807
saza-ku commented 1 year ago

isucon2

alp

+-------+--------+-----+-----+-----+-----+-----+-----+
| COUNT | METHOD | URI | MIN | MAX | SUM | AVG | P99 |
+-------+--------+-----+-----+-----+-----+-----+-----+
+-------+--------+-----+-----+-----+-----+-----+-----+

slow query

Count: 32386  Time=0.00s (58s)  Lock=0.00s (0s)  Rows=0.2 (6504), isudns[isudns]@isucon1
  SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and name='S' and domain_id=N

Count: 23695  Time=0.00s (40s)  Lock=0.00s (0s)  Rows=0.5 (11996), isudns[isudns]@isucon1
  SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and type='S' and name='S'

Count: 39316  Time=0.00s (4s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='S'

Count: 541  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  delete from records where domain_id=N and name='S' and type='S'

Count: 1082  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=0.5 (541), isudns[isudns]@isucon1
  SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=N and type='S' and name='S' and domain_id=N

Count: 93922  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  #

Count: 541  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  commit

Count: 541  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values ('S',N,N,'S',N,N,'S',NULL,N)

Count: 541  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=1.0 (541), isudns[isudns]@isucon1
  select id,name,master,last_check,notified_serial,type,options,catalog,account from domains where name='S'

Count: 1083  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED

explain

Reading from STDIN ...

# 12s user time, 30ms system time, 36.88M rss, 51.07M vsz
# Current date: Sat Nov 25 08:09:22 2023
# Hostname: ip-192-168-0-12
# Files: STDIN
# Overall: 194.20k total, 20 unique, 2.34k QPS, 1.32x concurrency ________
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:09:10
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time           109s     1us    12ms   563us     2ms   844us    89us
# Lock time          166ms       0     5ms       0     1us    21us       0
# Rows sent         19.13k       0       1    0.10    0.99    0.30       0
# Rows examine      85.86M       0   1.78k  463.60   1.61k  700.02       0
# Query size        15.05M       5     222   81.25  151.03   48.67  112.70

# Profile
# Rank Query ID                      Response time Calls R/Call V/M   Item
# ==== ============================= ============= ===== ====== ===== ====
#    1 0x42EF7D7D98FBCC9723BF896E... 58.5585 53.5% 32386 0.0018  0.00 SELECT records
#    2 0x3D83BC87F3B3A00D571FFC81... 40.0881 36.7% 23695 0.0017  0.00 SELECT records
#    3 0x22279D81D51006139E0C7640...  4.8248  4.4% 39316 0.0001  0.00 SELECT domains domainmetadata
#    4 0x859BBB7E9D760686137A9444...  2.2016  2.0%   541 0.0041  0.00 DELETE records
# MISC 0xMISC                         3.7027  3.4% 98258 0.0000   0.0 <16 ITEMS>

# Query 1: 490.70 QPS, 0.89x concurrency, ID 0x42EF7D7D98FBCC9723BF896EBFC51D24 at byte 31312676
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         16   32386
# Exec time     53     59s   705us    12ms     2ms     3ms   569us     2ms
# Lock time     26    43ms       0     2ms     1us     1us    12us     1us
# Rows sent     33   6.35k       0       1    0.20    0.99    0.40       0
# Rows examine  56  48.16M   1.25k   1.78k   1.52k   1.69k  145.26   1.46k
# Query size    29   4.37M     129     222  141.54  158.58   11.53  136.99
# String:
# Hosts        isucon1
# Users        isudns
# Query_time distribution
#   1us
#  10us
# 100us  #
#   1ms  ################################################################
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'records'\G
#    SHOW CREATE TABLE `records`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='fc1nuzdwtgtlg1n6j7sinzz80.u.isucon.dev' and domain_id=4\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.records' doesn't exist [for Statement "EXPLAIN SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='fc1nuzdwtgtlg1n6j7sinzz80.u.isucon.dev' and domain_id=4"] at /usr/bin/pt-query-digest line 7796.

# Query 2: 359.02 QPS, 0.61x concurrency, ID 0x3D83BC87F3B3A00D571FFC8104A6E50C at byte 43687882
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         12   23695
# Exec time     36     40s   662us    10ms     2ms     3ms   546us     2ms
# Lock time     19    32ms       0     2ms     1us     1us    12us     1us
# Rows sent     61  11.71k       0       1    0.51    0.99    0.50    0.99
# Rows examine  41  35.30M   1.25k   1.78k   1.53k   1.69k  145.70   1.46k
# Query size    20   3.06M     126     221  135.31  151.03   10.90  124.25
# String:
# Hosts        isucon1
# Users        isudns
# Query_time distribution
#   1us
#  10us
# 100us  #
#   1ms  ################################################################
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'records'\G
#    SHOW CREATE TABLE `records`\G
# EXPLAIN 
SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='SOA' and name='i0f1v4oa3ct50h5lky0.u.isucon.dev'\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.records' doesn't exist [for Statement "EXPLAIN SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='SOA' and name='i0f1v4oa3ct50h5lky0.u.isucon.dev'"] at /usr/bin/pt-query-digest line 7796.

# Query 3: 595.70 QPS, 0.07x concurrency, ID 0x22279D81D51006139E0C76405B54C261 at byte 40334582
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         20   39316
# Exec time      4      5s    73us     3ms   122us   159us   100us   103us
# Lock time     37    62ms       0     2ms     1us     1us    14us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0       0       0       0       0       0       0       0
# Query size    28   4.27M     114     114     114     114       0     114
# String:
# Hosts        isucon1
# Users        isudns
# Query_time distribution
#   1us
#  10us  ############
# 100us  ################################################################
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'domains'\G
#    SHOW CREATE TABLE `domains`\G
#    SHOW TABLE STATUS LIKE 'domainmetadata'\G
#    SHOW CREATE TABLE `domainmetadata`\G
# EXPLAIN 
select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='u.isucon.dev'\G
# EXPLAIN failed: DBD::mysql::st execute failed: Table 'isupipe.domains' doesn't exist [for Statement "EXPLAIN select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='u.isucon.dev'"] at /usr/bin/pt-query-digest line 7796.

# Query 4: 8.32 QPS, 0.03x concurrency, ID 0x859BBB7E9D760686137A944406874C4D at byte 50725260
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:48 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     541
# Exec time      2      2s     2ms     9ms     4ms     6ms     1ms     4ms
# Lock time     15    26ms       0     5ms    48us     1us   368us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0 818.89k   1.25k   1.78k   1.51k   1.69k  152.35   1.46k
# Query size     0  45.16k      78      93   85.47   88.31    3.30   84.10
# String:
# Hosts        isucon1
# Users        isudns
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  ################################################################
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'records'\G
#    SHOW CREATE TABLE `records`\G
delete from records where domain_id=4 and name='kobayashimikako0.u.isucon.dev' and type='A'\G
# Converted for EXPLAIN
# EXPLAIN 
select * from  records where domain_id=4 and name='kobayashimikako0.u.isucon.dev' and type='A'\G

netdata

http://localhost:19992/#menu_services;after=1700899667656;before=1700899747664

pprof

go tool pprof -http=0.0.0.0:1080 http://isucon2/pprof/11250807
saza-ku commented 1 year ago

isucon3

alp

+-------+--------+-----+-----+-----+-----+-----+-----+
| COUNT | METHOD | URI | MIN | MAX | SUM | AVG | P99 |
+-------+--------+-----+-----+-----+-----+-----+-----+
+-------+--------+-----+-----+-----+-----+-----+-----+

slow query

Count: 23180  Time=0.00s (16s)  Lock=0.00s (0s)  Rows=1.0 (23180), isucon[isucon]@isucon1
  SELECT * FROM themes WHERE user_id = N

Count: 704  Time=0.01s (7s)  Lock=0.00s (0s)  Rows=2.7 (1886), isucon[isucon]@isucon1
  SELECT * FROM livestreams WHERE user_id = N

Count: 513  Time=0.01s (5s)  Lock=0.00s (0s)  Rows=0.0 (0), isucon[isucon]@isucon1
  UPDATE reservation_slots SET slot = slot - N WHERE start_at >= N AND end_at <= N

Count: 514  Time=0.01s (5s)  Lock=0.00s (0s)  Rows=10.0 (5122), isucon[isucon]@isucon1
  SELECT * FROM reservation_slots WHERE start_at >= N AND end_at <= N FOR UPDATE

Count: 15778  Time=0.00s (3s)  Lock=0.00s (0s)  Rows=5.0 (78378), isucon[isucon]@isucon1
  SELECT livestream_id, tags.id AS tag_id, tags.name as tag_name  FROM livestream_tags as l LEFT JOIN tags ON l.tag_id = tags.id WHERE livestream_id = N

Count: 22609  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=1.0 (22609), isucon[isucon]@isucon1
  SELECT * FROM users WHERE id = N

Count: 1290  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=244.2 (315081), isucon[isucon]@isucon1
  SELECT livestream_id, tags.id AS tag_id, tags.name as tag_name  FROM livestream_tags as l LEFT JOIN tags ON l.tag_id = tags.id WHERE livestream_id IN (N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N)

Count: 22618  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=0.0 (0), isucon[isucon]@isucon1
  COMMIT

Count: 805  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=2617.3 (2106887), isucon[isucon]@isucon1
  SELECT * FROM livecomments

Count: 18855  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=1.0 (18855), isucon[isucon]@isucon1
  SELECT * FROM livestreams WHERE id = N

explain

Reading from STDIN ...

# 13s user time, 30ms system time, 38.12M rss, 52.48M vsz
# Current date: Sat Nov 25 08:09:22 2023
# Hostname: ip-192-168-0-13
# Files: STDIN
# Overall: 200.06k total, 71 unique, 2.44k QPS, 0.85x concurrency ________
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:09:09
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time            70s     1us    52ms   349us   925us     1ms    93us
# Lock time          199ms       0     4ms       0     1us    21us     1us
# Rows sent          3.16M       0   7.82k   16.54   14.52  193.55    0.99
# Rows examine      59.35M       0  13.10k  311.08   1.33k  921.86    0.99
# Query size        11.58M       6     981   60.70  151.03   69.19   40.45

# Profile
# Rank Query ID                     Response time Calls  R/Call V/M   Item
# ==== ============================ ============= ====== ====== ===== ====
#    1 0x38BC86A45F31C6B1EE32467... 16.5751 23.7%  23180 0.0007  0.00 SELECT themes
#    2 0x9EAD6C0CE525E3693EE27FF...  7.8522 11.2%    704 0.0112  0.00 SELECT livestreams
#    3 0x5A8A79FB9E5D1635CA10FEA...  5.4946  7.9%   7496 0.0007  0.00 SELECT themes
#    4 0xA3401CA3ABCC04C3AB221DB...  5.3455  7.7%    513 0.0104  0.00 UPDATE reservation_slots
# MISC 0xMISC                       34.5625 49.5% 168169 0.0002   0.0 <67 ITEMS>

# Query 1: 351.21 QPS, 0.25x concurrency, ID 0x38BC86A45F31C6B1EE324671506C898A at byte 21401946
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         11   23180
# Exec time     23     17s   242us    13ms   715us     2ms   579us   568us
# Lock time     11    23ms       0   707us     1us     1us     8us     1us
# Rows sent      0  22.64k       1       1       1       1       0       1
# Rows examine  47  28.40M    1000   1.50k   1.25k   1.46k  150.16   1.20k
# Query size     7 928.03k      38      41   41.00   40.45    0.11   40.45
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us  ################################################################
#   1ms  ########
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'themes'\G
#    SHOW CREATE TABLE `themes`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM themes WHERE user_id = 1023\G
# *************************** 1. row ***************************
#            id: 1
#   select_type: SIMPLE
#         table: themes
#    partitions: NULL
#          type: ALL
# possible_keys: NULL
#           key: NULL
#       key_len: NULL
#           ref: NULL
#          rows: 1541
#      filtered: 10.00
#         Extra: Using where

# Query 2: 10.67 QPS, 0.12x concurrency, ID 0x9EAD6C0CE525E3693EE27FFC9AAF05A3 at byte 10678007
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     704
# Exec time     11      8s     4ms    41ms    11ms    21ms     5ms    10ms
# Lock time      0   685us       0    16us       0     1us     1us     1us
# Rows sent      0   1.84k       0      21    2.68    7.70    2.88    1.96
# Rows examine   8   5.23M   7.32k   7.82k   7.60k   7.68k  182.48   7.31k
# Query size     0  31.62k      43      46   45.99   44.60    0.16   44.60
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  #########################################################
#  10ms  ################################################################
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'livestreams'\G
#    SHOW CREATE TABLE `livestreams`\G
# EXPLAIN 
SELECT * FROM livestreams WHERE user_id = 1102\G
# *************************** 1. row ***************************
#            id: 1
#   select_type: SIMPLE
#         table: livestreams
#    partitions: NULL
#          type: ALL
# possible_keys: NULL
#           key: NULL
#       key_len: NULL
#           ref: NULL
#          rows: 7699
#      filtered: 10.00
#         Extra: Using where

# Query 3: 115.32 QPS, 0.08x concurrency, ID 0x5A8A79FB9E5D1635CA10FEA9BAB68CB0 at byte 46849072
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:48 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          3    7496
# Exec time      7      5s   247us    19ms   733us     2ms   607us   596us
# Lock time      3     8ms       0   492us     1us     1us     6us     1us
# Rows sent      2  66.89k       1     136    9.14   49.17   17.13    1.96
# Rows examine  15   9.20M    1001   1.50k   1.26k   1.46k  148.78   1.26k
# Query size     5 692.83k      44     725   94.65  329.68   98.40   49.17
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us  ################################################################
#   1ms  ########
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'themes'\G
#    SHOW CREATE TABLE `themes`\G
# EXPLAIN 
SELECT * FROM themes WHERE user_id IN (1172, 1042)\G
# *************************** 1. row ***************************
#            id: 1
#   select_type: SIMPLE
#         table: themes
#    partitions: NULL
#          type: ALL
# possible_keys: NULL
#           key: NULL
#       key_len: NULL
#           ref: NULL
#          rows: 1541
#      filtered: 20.00
#         Extra: Using where

# Query 4: 7.77 QPS, 0.08x concurrency, ID 0xA3401CA3ABCC04C3AB221DB8AD5CBF26 at byte 10671834
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T08:07:47 to 2023-11-25T08:08:53
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     513
# Exec time      7      5s     5ms    44ms    10ms    19ms     5ms     9ms
# Lock time      0   919us       0   309us     1us     1us    13us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   7   4.29M   8.55k   8.55k   8.55k   8.55k       0   8.55k
# Query size     0  49.10k      98      98      98      98       0      98
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us
#   1ms  ################################################################
#  10ms  ######################################################
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'reservation_slots'\G
#    SHOW CREATE TABLE `reservation_slots`\G
UPDATE reservation_slots SET slot = slot - 1 WHERE start_at >= 1702022400 AND end_at <= 1702051200\G
# Converted for EXPLAIN
# EXPLAIN 
select  slot = slot - 1 from reservation_slots where  start_at >= 1702022400 AND end_at <= 1702051200\G

netdata

http://localhost:19993/#menu_services;after=1700899667665;before=1700899747672

pprof

go tool pprof -http=0.0.0.0:1080 http://isucon3/pprof/11250807