Skip to content

Instantly share code, notes, and snippets.

@dkaz
dkaz / worst-indexes.sql
Created October 19, 2010 21:56
Find the worst performing indexes in MySQL server
/*
SQL script to grab the worst performing indexes
in the whole server
*/
SELECT
t.TABLE_SCHEMA AS `db`
, t.TABLE_NAME AS `table`
, s.INDEX_NAME AS `inde name`
, s.COLUMN_NAME AS `field name`
, s.SEQ_IN_INDEX `seq in index`
@dkaz
dkaz / Generator.java
Created November 25, 2009 04:12 — forked from abhin4v/Fibonacci.java
Python-style Generator in Java
package net.abhinavsarkar.util;
import java.util.Iterator;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;