Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

11250732 #79

Open
saza-ku opened this issue Nov 25, 2023 · 3 comments
Open

11250732 #79

saza-ku opened this issue Nov 25, 2023 · 3 comments
Labels

Comments

@saza-ku
Copy link
Owner

saza-ku commented Nov 25, 2023

68000
#6

@saza-ku saza-ku added the measure 計測結果 label Nov 25, 2023
@saza-ku
Copy link
Owner Author

saza-ku commented Nov 25, 2023

isucon1

alp

+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| COUNT | METHOD |                   URI                    |  MIN  |  MAX  |   SUM   |  AVG  |  P99  |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+
| 411   | GET    | /api/livestream/.+                       | 0.004 | 1.100 | 194.160 | 0.472 | 1.032 |
| 4063  | GET    | /api/livestream/.+/reaction              | 0.004 | 0.120 | 115.924 | 0.029 | 0.068 |
| 4032  | GET    | /api/livestream/.+/livecomment           | 0.004 | 0.112 | 98.284  | 0.024 | 0.064 |
| 3794  | POST   | /api/livestream/.+/livecomment           | 0.004 | 0.140 | 94.968  | 0.025 | 0.072 |
| 3696  | POST   | /api/livestream/.+/reaction              | 0.004 | 0.128 | 84.656  | 0.023 | 0.068 |
| 565   | POST   | /api/register                            | 0.004 | 0.196 | 57.988  | 0.103 | 0.160 |
| 37029 | GET    | /api/user/.+/icon                        | 0.000 | 0.028 | 57.792  | 0.002 | 0.008 |
| 444   | POST   | /api/livestream/.+                       | 0.028 | 0.136 | 29.488  | 0.066 | 0.128 |
| 599   | POST   | /api/icon                                | 0.004 | 0.080 | 8.836   | 0.015 | 0.060 |
| 174   | GET    | /api/livestream                          | 0.004 | 0.176 | 7.952   | 0.046 | 0.144 |
| 570   | POST   | /api/login                               | 0.004 | 0.072 | 6.396   | 0.011 | 0.048 |
| 227   | POST   | /api/livestream/.+/moderate              | 0.004 | 0.084 | 5.816   | 0.026 | 0.056 |
| 38    | GET    | /api/user/.+/statistics                  | 0.024 | 0.232 | 5.428   | 0.143 | 0.232 |
| 433   | GET    | /api/livestream/.+/report                | 0.004 | 0.124 | 5.324   | 0.012 | 0.068 |
| 456   | GET    | /api/tag                                 | 0.004 | 0.080 | 5.036   | 0.011 | 0.048 |
| 322   | GET    | /api/livestream/.+/ngwords               | 0.000 | 0.080 | 3.388   | 0.011 | 0.044 |
| 350   | POST   | /api/livestream/.+/enter                 | 0.004 | 0.096 | 3.372   | 0.010 | 0.048 |
| 341   | DELETE | /api/livestream/.+/exit                  | 0.004 | 0.052 | 3.220   | 0.009 | 0.040 |
| 36    | GET    | /api/user/.+/livestream                  | 0.040 | 0.168 | 3.076   | 0.085 | 0.168 |
| 23    | GET    | /api/livestream/.+/statistics            | 0.024 | 0.164 | 2.404   | 0.105 | 0.164 |
| 58    | POST   | /api/livestream/.+/livecomment/.+/report | 0.004 | 0.064 | 1.696   | 0.029 | 0.064 |
| 37    | GET    | /api/user/.+/theme                       | 0.004 | 0.036 | 0.488   | 0.013 | 0.036 |
| 4     | GET    | /api/user/.+                             | 0.004 | 0.004 | 0.008   | 0.002 | 0.004 |
| 1     | GET    | /api/payment                             | 0.004 | 0.004 | 0.004   | 0.004 | 0.004 |
+-------+--------+------------------------------------------+-------+-------+---------+-------+-------+

slow query


explain

Reading from STDIN ...

# No events processed.

netdata

http://localhost:19991/#menu_services;after=1700897564394;before=1700897640474

pprof

go tool pprof -http=0.0.0.0:1080 http://isucon1/pprof/11250732

@saza-ku
Copy link
Owner Author

saza-ku commented Nov 25, 2023

isucon2

alp

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

slow query

Count: 31951  Time=0.00s (59s)  Lock=0.00s (0s)  Rows=0.2 (5810), 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: 23186  Time=0.00s (40s)  Lock=0.00s (0s)  Rows=0.5 (11755), 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: 38958  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: 563  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: 1126  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=0.5 (563), 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: 94723  Time=0.00s (1s)  Lock=0.00s (0s)  Rows=0.0 (0), isudns[isudns]@isucon1
  #

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

Count: 563  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: 563  Time=0.00s (0s)  Lock=0.00s (0s)  Rows=1.0 (563), isudns[isudns]@isucon1
  select id,name,master,last_check,notified_serial,type,options,catalog,account from domains where name='S'

Count: 1126  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 ...

# 11.9s user time, 60ms system time, 36.62M rss, 51.18M vsz
# Current date: Sat Nov 25 07:34:18 2023
# Hostname: ip-192-168-0-12
# Files: STDIN
# Overall: 193.89k total, 20 unique, 2.36k QPS, 1.35x concurrency ________
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:34:06
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time           111s     1us    13ms   572us     2ms   872us    89us
# Lock time          173ms       0     6ms       0     1us    21us       0
# Rows sent         18.26k       0       1    0.10    0.99    0.29       0
# Rows examine      85.02M       0   1.80k  459.77   1.69k  702.31       0
# Query size        14.93M       5     224   80.75  151.03   48.71   51.63

# Profile
# Rank Query ID                      Response time Calls R/Call V/M   Item
# ==== ============================= ============= ===== ====== ===== ====
#    1 0x42EF7D7D98FBCC9723BF896E... 59.6403 53.7% 31951 0.0019  0.00 SELECT records
#    2 0x3D83BC87F3B3A00D571FFC81... 40.3137 36.3% 23186 0.0017  0.00 SELECT records
#    3 0x22279D81D51006139E0C7640...  4.8090  4.3% 38958 0.0001  0.00 SELECT domains domainmetadata
#    4 0x859BBB7E9D760686137A9444...  2.3450  2.1%   563 0.0042  0.00 DELETE records
# MISC 0xMISC                         3.8553  3.5% 99234 0.0000   0.0 <16 ITEMS>

# Query 1: 469.87 QPS, 0.88x concurrency, ID 0x42EF7D7D98FBCC9723BF896EBFC51D24 at byte 46902912
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         16   31951
# Exec time     53     60s   710us    13ms     2ms     3ms   620us     2ms
# Lock time     25    45ms       0     2ms     1us     1us    12us     1us
# Rows sent     31   5.67k       0       1    0.18    0.99    0.38       0
# Rows examine  56  47.79M   1.25k   1.80k   1.53k   1.69k  155.16   1.46k
# Query size    28   4.32M     129     224  141.68  158.58   11.81  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='7ztna53a3u0n3bx0.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='7ztna53a3u0n3bx0.u.isucon.dev' and domain_id=4"] at /usr/bin/pt-query-digest line 7796.

# Query 2: 340.97 QPS, 0.59x concurrency, ID 0x3D83BC87F3B3A00D571FFC8104A6E50C at byte 53163806
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         11   23186
# Exec time     36     40s   665us    13ms     2ms     3ms   578us     2ms
# Lock time     18    33ms       0     2ms     1us     1us    10us     1us
# Rows sent     62  11.48k       0       1    0.51    0.99    0.50    0.99
# Rows examine  40  34.71M   1.25k   1.80k   1.53k   1.69k  155.09   1.46k
# Query size    20   3.00M     126     223  135.45  151.03   11.12  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='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='u.isucon.dev'"] at /usr/bin/pt-query-digest line 7796.

# Query 3: 572.91 QPS, 0.07x concurrency, ID 0x22279D81D51006139E0C76405B54C261 at byte 54659377
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         20   38958
# Exec time      4      5s    72us     4ms   123us   159us   100us   103us
# Lock time     38    66ms       0     3ms     1us     1us    19us     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.24M     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.28 QPS, 0.03x concurrency, ID 0x859BBB7E9D760686137A944406874C4D at byte 19093785
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     563
# Exec time      2      2s     2ms    11ms     4ms     6ms     1ms     4ms
# Lock time     15    26ms       0     6ms    46us     1us   353us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   0 858.23k   1.25k   1.80k   1.52k   1.69k  160.73   1.46k
# Query size     0  47.04k      78      93   85.55   88.31    3.34   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='syoshida0.u.isucon.dev' and type='A'\G
# Converted for EXPLAIN
# EXPLAIN 
select * from  records where domain_id=4 and name='syoshida0.u.isucon.dev' and type='A'\G

netdata

http://localhost:19992/#menu_services;after=1700897564408;before=1700897644418

pprof

go tool pprof -http=0.0.0.0:1080 http://isucon2/pprof/11250732

@saza-ku
Copy link
Owner Author

saza-ku commented Nov 25, 2023

isucon3

alp

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

slow query

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

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

Count: 3715  Time=0.00s (9s)  Lock=0.00s (0s)  Rows=12.6 (46981), isucon[isucon]@isucon1
  SELECT * FROM reactions WHERE livestream_id = N ORDER BY created_at DESC

Count: 441  Time=0.02s (8s)  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: 442  Time=0.02s (7s)  Lock=0.00s (0s)  Rows=9.8 (4347), isucon[isucon]@isucon1
  SELECT * FROM reservation_slots WHERE start_at >= N AND end_at <= N FOR UPDATE

Count: 40367  Time=0.00s (6s)  Lock=0.00s (0s)  Rows=4.5 (181994), isucon[isucon]@isucon1
  SELECT * FROM livestream_tags WHERE livestream_id = N

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

Count: 248  Time=0.02s (4s)  Lock=0.00s (0s)  Rows=3.3 (820), isucon[isucon]@isucon1
  SELECT * FROM livestreams WHERE user_id = N

Count: 3028  Time=0.00s (2s)  Lock=0.00s (0s)  Rows=1.3 (3946), isucon[isucon]@isucon1
  SELECT * FROM themes WHERE user_id IN (N, N)

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


explain

Reading from STDIN ...

# 26.6s user time, 70ms system time, 37.88M rss, 52.24M vsz
# Current date: Sat Nov 25 07:34:35 2023
# Hostname: ip-192-168-0-13
# Files: STDIN
# Overall: 440.62k total, 66 unique, 5.25k QPS, 1.48x concurrency ________
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:34:08
# Attribute          total     min     max     avg     95%  stddev  median
# ============     ======= ======= ======= ======= ======= ======= =======
# Exec time           124s     1us    77ms   281us   799us     1ms    76us
# Lock time          407ms       0     6ms       0     1us    19us     1us
# Rows sent          1.61M       0   7.73k    3.84    4.96   90.02    0.99
# Rows examine      94.49M       0  13.91k  224.86   1.33k  681.12    0.99
# Query size        16.91M       6     453   40.25   72.65   26.89   31.70

# Profile
# Rank Query ID                     Response time Calls  R/Call V/M   Item
# ==== ============================ ============= ====== ====== ===== ====
#    1 0x38BC86A45F31C6B1EE32467... 39.3748 31.8%  48699 0.0008  0.00 SELECT themes
#    2 0xFBC5564AE716EAE82F20BFB... 16.1184 13.0% 181991 0.0001  0.00 SELECT tags
#    3 0xAD0C28443E1E5CFAFF1569D...  9.4354  7.6%   3715 0.0025  0.00 SELECT reactions
#    4 0xA3401CA3ABCC04C3AB221DB...  8.3348  6.7%    441 0.0189  0.00 UPDATE reservation_slots
# MISC 0xMISC                       50.6544 40.9% 205778 0.0002   0.0 <62 ITEMS>

# Query 1: 716.16 QPS, 0.58x concurrency, ID 0x38BC86A45F31C6B1EE324671506C898A at byte 97528272
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         11   48699
# Exec time     31     39s   239us    14ms   808us     2ms   693us   596us
# Lock time     10    42ms       0   852us       0     1us     6us     1us
# Rows sent      2  47.56k       1       1       1       1       0       1
# Rows examine  63  59.59M    1000   1.53k   1.25k   1.46k  158.45   1.20k
# Query size    11   1.90M      38      41   40.88   40.45    0.61   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 = 1220\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: 1562
#      filtered: 10.00
#         Extra: Using where

# Query 2: 2.68k QPS, 0.24x concurrency, ID 0xFBC5564AE716EAE82F20BFB45F6C37E7 at byte 34629680
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count         41  181991
# Exec time     13     16s    40us     8ms    88us   103us   154us    66us
# Lock time     43   176ms       0     5ms       0     1us    17us     1us
# Rows sent     10 177.73k       1       1       1       1       0       1
# Rows examine   0 177.73k       1       1       1       1       0       1
# Query size    32   5.55M      31      33   31.96   31.70    0.42   31.70
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us  ################################################################
# 100us  ###
#   1ms  #
#  10ms
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'tags'\G
#    SHOW CREATE TABLE `tags`\G
# EXPLAIN 
SELECT * FROM tags WHERE id = 2\G
# *************************** 1. row ***************************
#            id: 1
#   select_type: SIMPLE
#         table: tags
#    partitions: NULL
#          type: const
# possible_keys: PRIMARY
#           key: PRIMARY
#       key_len: 8
#           ref: const
#          rows: 1
#      filtered: 100.00
#         Extra: NULL

# Query 3: 58.97 QPS, 0.15x concurrency, ID 0xAD0C28443E1E5CFAFF1569DBB4F7E63A at byte 101202437
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:49 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0    3715
# Exec time      7      9s   353us    20ms     3ms     7ms     2ms     2ms
# Lock time      1     4ms       0   691us     1us     1us    11us     1us
# Rows sent      2  45.88k       0      79   12.65   36.69   11.75    8.91
# Rows examine  10  10.10M    1004   4.61k   2.78k   4.27k   1.03k   2.76k
# Query size     1 272.09k      75      75      75      75       0      75
# String:
# Hosts        isucon1
# Users        isucon
# Query_time distribution
#   1us
#  10us
# 100us  #########
#   1ms  ################################################################
#  10ms  #
# 100ms
#    1s
#  10s+
# Tables
#    SHOW TABLE STATUS LIKE 'reactions'\G
#    SHOW CREATE TABLE `reactions`\G
# EXPLAIN 
SELECT * FROM reactions WHERE livestream_id = 7756 ORDER BY created_at DESC\G
# *************************** 1. row ***************************
#            id: 1
#   select_type: SIMPLE
#         table: reactions
#    partitions: NULL
#          type: ALL
# possible_keys: NULL
#           key: NULL
#       key_len: NULL
#           ref: NULL
#          rows: 4677
#      filtered: 10.00
#         Extra: Using where; Using filesort

# Query 4: 6.49 QPS, 0.12x concurrency, ID 0xA3401CA3ABCC04C3AB221DB8AD5CBF26 at byte 95353117
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2023-11-25T07:32:44 to 2023-11-25T07:33:52
# Attribute    pct   total     min     max     avg     95%  stddev  median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count          0     441
# Exec time      6      8s     5ms    63ms    19ms    36ms    10ms    16ms
# Lock time      0   472us       0   101us     1us     1us     4us     1us
# Rows sent      0       0       0       0       0       0       0       0
# Rows examine   3   3.68M   8.55k   8.55k   8.55k   8.55k       0   8.55k
# Query size     0  42.21k      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 >= 1704121200 AND end_at <= 1704124800\G
# Converted for EXPLAIN
# EXPLAIN 
select  slot = slot - 1 from reservation_slots where  start_at >= 1704121200 AND end_at <= 1704124800\G

netdata

http://localhost:19993/#menu_services;after=1700897564391;before=1700897644398

pprof

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants