Thanks. I think using GROUP BY without aggregates is a strange way to
remove duplicates, anyway.
Not intentional. SQLite simply fails to recognize that by using the GROUP
BY in descending order it could avoid the ORDER BY clause. This is an
optimization that we have never considered because it
Hi,
I have been thinking about a question on stackoverflow
(http://stackoverflow.com/questions/19236363/select-distinct-faster-than-group-by),
where some SQL framework removes duplicates from results using GROUP BY
instead of DISTINCT.
I don't want to discuss that this might not be a good
I cannot definitely solve your problem but I can think of some things to try.
First, do these:
ANALYZE;
CREATE INDEX map_dsn ON map (d, s, n);
CREATE INDEX map_dns ON map (d, n, s);
then execute the same SELECT. Does it have the same problem ? Does the
EXPLAIN QUERY PLAN tell you which
You may want to put the columns with the highest selectivity first in
your index.
The device 15 has nearly 10 entries in the table while the remaining of
the 600 Million records belong to another device.
E.g., CREATE INDEX map_index ON map (d, ...);
Also, you should run ANALYZE map so that
4 matches
Mail list logo