Skip to content

Instantly share code, notes, and snippets.

@saghul
Created September 5, 2010 10:06
Show Gist options
  • Save saghul/565912 to your computer and use it in GitHub Desktop.
Save saghul/565912 to your computer and use it in GitHub Desktop.
CREATE VIRTUAL TABLE enrondata1 USING fts3(content TEXT); /* FTS3 table */
CREATE TABLE enrondata2(content TEXT); /* Ordinary table */
SELECT count(*) FROM enrondata1 WHERE content MATCH 'linux'; /* 0.03 seconds */
SELECT count(*) FROM enrondata2 WHERE content LIKE '%linux%'; /* 22.5 seconds */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment