Welcome To Snipplr
Everyone's Recent MySQL Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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...
1
767
posted 15 years ago by Eloi
This will create and then populate a MySQL table with a list of the names for countries in existence. Country names are in Turkish language.
0
1231
posted 15 years ago by sensimevanidus
granting DB specific and general access priveleges from the CLI
1
850
posted 15 years ago by stiobhart
Splitting table users in frequently and infrequently accessed attributes
2
1178
posted 15 years ago by Eloi
Saving the IP as Int we save a lot of space and permit do beautibul selects
2
793
posted 15 years ago by Eloi
If you run a query to delete old posts manually from MySQL in a WordPress database, the old tags will remain and appear in your tag cloud/listing. This allows you to identify those unused tags, and then delete them with an additional query.
0
744
posted 15 years ago by jkriddle
Administering more than one node at a time through the Drupal admin interface is like drinking a milkshake through a buckytube.
[How to use phpmyadmin and sql to perform mass operations on nodes](http://drupal.org/node/134535)
1
861
posted 15 years ago by zachharkey
In case you don't feel like loading 3 pages to edit a single url alias.
1
833
posted 15 years ago by zachharkey
We wanted to change all /films/example style paths to /film/example (basically remove the 's').
Here was the query that worked:
1
661
posted 15 years ago by zachharkey
When you forget to "SET NAMES utf8", you'll probably end up with a bunch of latin1 data in your utf8 column. This query fixes that, CONVERTing the existing data to its correct collation.
4
860
posted 15 years ago by jdbartlett
This gets me every time. Why doesn't my blog work?! Oh yeah, that's why.
0
634
posted 15 years ago by jaspertandy
I currently have project_issue nodes set for replacement pattern issues/issue[nid] in Drupal 5.x PathAuto. This query fixes all of the URL aliases for entries created before this was set correctly.
0
717
posted 15 years ago by tgbdad
Some other alter syntax examples at the URL, which beats the pants off the MySQL manual for some reason.
0
818
posted 15 years ago by tclancy