Skip to content

Instantly share code, notes, and snippets.

@varnit
Created August 29, 2009 20:45
Show Gist options
  • Save varnit/177665 to your computer and use it in GitHub Desktop.
Save varnit/177665 to your computer and use it in GitHub Desktop.
sqlite> CREATE TABLE dogs (dog_id INTEGER PRIMARY KEY AUTOINCREMENT, dog_name VARCHAR(100), state CHAR(2));
sqlite> CREATE INDEX dog on dogs(state);
sqlite> .indices dogs
dog
sqlite> EXPLAIN QUERY PLAN SELECT dog_name FROM dogs WHERE state='FL';
0|0|TABLE leagues WITH INDEX league
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment