sql - SQLite join optimisation -


if have query such as:

select a.name, a.description inner join b on a.id1 = b.id1 inner join c on b.id2 = c.id2 group a.name, a.description 

what optimal columns index query in sqlite if consider there on 100,000 rows in each of tables?

the reason ask not performance query group expect rdbms (sql server) when apply same optimisation.

would right in thinking columns referenced on single table in query in sqlite need included in single composite index best performance?

the problem you're expecting sqlite have same performance characteristics full rdbms. won't. sqllite doesn't have luxury of getting cache quite in memory, has rebuild cache every time run application, limited set number of cores, etc, etc, etc. tradeoffs using embedded rdbms on full one.

as far optimizations go, try indexing lookup columns , test. try creating covering index. sure test both selects , code paths update database, you're speeding 1 @ expense of other. find indexing gives best balance between 2 needs , go it.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -