Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Indexes and query behavior is usually pretty tied to the way a particular database engine works - and I don't know SQLlite at all, so I can't really help you with specifics.
However, your table schema is exceedingly simple, so you really only have two choices: or (and their opposites). The first form is more "correct" - you really only want the key in the index. The second form may give you slightly better performance, at the expense of allowing duplicate "left" words into the table as long as they point at a different "right" word, and slightly more work during inserts (index maintenance is a little more complicated). Personally I'd use the first form (index on "left", and a separate index on "right"). Michael In reply to Re^5: Hash lookups, Database lookups, and Scalability
by mpeppler
|
|