Skip to main content

Posts

Showing posts with the label indexes

MySQL User Group Meetup in Amsterdam

This Tuesday Markus Winand will talk at the MySQL User Group NL meetup about "Indexes: The neglected performance all-rounder" . Markus is known for the http://use-the-index-luke.com website and the SQL Performance Explained book. Date: Tuesday August 12 Location: Marktplaats/eBay Office Amsterdam Registration: http://www.meetup.com/MySQL-User-Group-NL/events/196440532/

Unittesting your indexes

During FOSDEM PGDay I watched the "Indexes: The neglected performance all-rounder" talk by Markus Winand. Both his talk and the "SQL Performance Explained" book (which is also available online ) are great. The conclusion of the talk is that we should put more effort in carefully designing indexes. But how can we make sure the indexes are really used now and in the future? We need to write some tests for it. So I wrote a small Python script to test index usage per query. This uses the JSON explain format available in MySQL 5.6. It's just a proof-of-concept so don't expect too much of it yet (but please sent pull requests!). A short example: #!/usr/bin/python3 import indextest class tester(indextest.IndexTester): def __init__(self): dbparams = { 'user': 'msandbox', 'password': 'msandbox', 'host': 'localhost', 'port': ...