sql - sqlite union all optimization -


I have a sqlite DB query that looks something like this:

  As a group of groups, groups, groups of groups, groups, groups, groups of groups, groups, groups, groups, groups, groups, groups, groups, groups, groups, Where TMS = Group Zone Association selects all the group, originals, destination, weight, rate, GroupCZones group group, where tms = groupZone union Select all groups, destination, weight, Rate, group group as group group, where tms = groupZone   

Is there a good way to optimize a question like this? I'm trying to create a simple scene that connects these 4 tables with the use of this visual query, taking questions about 13 seconds in the scene.

I tried to make indexes for 4 tables but it could not help.

When I talk about SQL, I am a simple newbie, I know enough to do simple things, but I am still learning advanced moves.

Any signs or information can be helpful.

CL told that I should run the EXPLEN QUERY PLAN command. This showed that two out of 4 indexes were not being used.

Thanks Cl!

I'm still thinking that there is a better way to do that query, but for now what I need to do.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -