Better performance than double SQLite inner join -
i have 3 tables (everything oversimplified question)
student --- studentid (primary key) universityid (indexed) cityid (indexed) studentname university --- universityid (primary key) universityname city --- cityid (primary key) cityname
i want print out student names, if names same, want order first cityname from, , universityname.
so, have simple query one:
select s.* student s inner join university u on s.universityid = u.universityid inner join city c on s.cityid = c.cityid order s.studentname asc, c.cityname asc, u.universityname asc
is there way improve performance of in way, , how?
the indexes on universityid
, cityid
not needed.
the order optimized index on studentname
.
Comments
Post a Comment