Last active
November 22, 2019 08:46
-
-
Save suya55/41b47b2913cb0f64a75e2ea6df76d19b to your computer and use it in GitHub Desktop.
Revisions
-
suya55 renamed this gist
Nov 22, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
suya55 renamed this gist
Nov 22, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
suya55 created this gist
Nov 22, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ``` $ yum install cargo; cargo install sd ``` ```shell egrep '(SELECT|UPDATE)' production.log | awk -F']' '{ print $3 }' | awk -F"ms)" '{ print $2 }' | sd "'[a-z0-9/ \.\-:]+'" '?' | sd '= [0-9]+' '= ?' | sd '[0-9]+ ?(, ?[0-9]+)+' '?' | sd '(, ?\?+)' '' | sd "'%.+%'" '?' | sd 'LIMIT [0-9]+' 'LIMIT ?' | sd 'OFFSET [0-9]+' 'OFFSET ?' | sort | uniq ```