Comment 9 for bug 1377887

Revision history for this message
Johan De Meersman (vegivamp+launchpad) wrote :

Using a simple SED expression to remove the BEGIN sections transforms this report (order by cnt):

# Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ================= ======= ====== ===== =========
# 1 0x85FFF5AA78E5FF6A 314186.0000 97.0% 1085038 0.2896 6.81 BEGIN
# 5 0x813031B8BBC3B329 312.0000 0.1% 784 0.3980 7.49 COMMIT
# 8 0x89B4BA8C6DB1884F 596.0000 0.2% 398 1.4975 1.36
# 10 0xEE10BF7D10CA0B10 565.0000 0.2% 316 1.7880 1.09 UPDATE paragraphs_item_revision
# 11 0xD4DCDA74342FCA25 565.0000 0.2% 316 1.7880 1.09 UPDATE paragraphs_item
# 12 0x8CF4591547D44AF1 550.0000 0.2% 307 1.7915 1.07 DELETE field_revision_field_article_tekst

into this report:

# Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============== ===== ====== ===== ==============
# 1 0xCED5912FB29A2A21 456.0000 4.6% 4539 0.1005 7.87 UPDATE elysia_cron
# 2 0xAA174BE9C0C45EB3 459.0000 4.7% 4052 0.1133 7.81 UPDATE elysia_cron
# 3 0x122CD1A1B3B706E1 374.0000 3.8% 3257 0.1148 6.86 UPDATE variable
# 4 0x813031B8BBC3B329 312.0000 3.2% 784 0.3980 7.49 COMMIT
# 7 0x89B4BA8C6DB1884F 596.0000 6.1% 398 1.4975 1.36
# 9 0xEE10BF7D10CA0B10 565.0000 5.8% 316 1.7880 1.09 UPDATE paragraphs_item_revision
# 10 0xD4DCDA74342FCA25 565.0000 5.8% 316 1.7880 1.09 UPDATE paragraphs_item
# 11 0x8CF4591547D44AF1 550.0000 5.6% 307 1.7915 1.07 DELETE field_revision_field_article_tekst

The latter is considerably more useful, as it both properly identifies the top queries, and also correctly calculates the % respose time for all queries. (I've not looked into the blank query, I assume it's also an RBR artifact)

The (imperfect!) sed expression is as simple as this:

        /\n/!N; /\n.*\n/!N; /\n.*\nBEGIN/d;P;D