Hello,

If you have a join in an SQL-query, how do you add the statements to
optimize the query in an index?

For example:

select a.* from animals a
join animaltype at on at.id=a.typeid
where a.name='Monkey' and a.subspecies=2

do I add the index like this: "create index idx_animals on
animals(typeid, name, subspecies) " ?
or is it done some other way?

Regards,
Jonas
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to