{ Snipperize } /SQL
SQL snippets
Kill All MySQL Connections Based On Condition
Kill All MySQL Connections Based On Condition
SQL / kill, connection, information_schema / by ThePeppersStudio (39 days, 12.81 hours ago)
Get Next Autoincrement Number
Get next autoincrement id.
SQL / autoincrement, information_schema / by ThePeppersStudio (42 days, 4.48 hours ago)
MySQL Age Calculation
Some code for calculating and determining a persons age
SQL / age, calculation, DATE_FORMAT / by ThePeppersStudio (87 days, 12.56 hours ago)
Bayesian Ranking
Use Bayesian values to get a "more fair" ranking than average value based ranking. Example with a "games" table having some ratings in table "ratings"
SQL / Bayesian, ranking / by ThePeppersStudio (125 days, 8.53 hours ago)
Insert or update if unique key already exist
SQL / insert, duplicate, key, update / by ThePeppersStudio (134 days, 6.11 hours ago)
初始化mysql tables
删除已经存在的表后并重建
SQL / mysql, table, drop, create / by ThePeppersStudio (232 days, 8.68 hours ago)
FIND & REPLACE
find and replace in a specific column field.
SQL / find, replace / by ThePeppersStudio (250 days, 16.33 hours ago)
The Worst Performing Indexes
This script shows the top 10 worst indexes (in terms of selectivity %) on the whole MySQL server instance. Selectivity is the percentage of distinct values in an indexed field compared to the number of records in the table. Note that this query can take some time to complete on servers with lots of databases or lots of tables.
SQL / performence / by ThePeppersStudio (250 days, 16.37 hours ago)
- 1
- Home
- New Snippet
- Languages
-

