sqlite3 insert or update
From thelinuxwiki
Create Index on Multiple Columns
index on multiple columns
CREATE INDEX index_name ON tab_name (column1, column2)
add an index on the columns "firstname" and "lastname"
CREATE INDEX index_firstandlastname ON tab (firstname, lastname)