![](https://secure.gravatar.com/avatar/374c26d6d1352652a0720c6d7cc3f98b.jpg?s=120&d=mm&r=g)
Dear Torsten The use of an imprint is only part of the algebra.select implementation and depends on actual several properties. In this particular query, the SQL compiler when encountering an order by issues a sort statement, even if this is strictly not needed. That will be detected by the sort implementation. regards, Martin On 15/02/2018 23:31, Torsten Grust wrote:
Dear all,
given a table definition and (explained) SQL query as follows:
|CREATE TABLE foo (x INT,y INT); INSERT INTO foo VALUES (3,1), (2,2), (1,3); ALTER TABLE foo SET READ ONLY; CREATE ORDERED INDEX foo_x ON foo(x); EXPLAIN SELECT * FROM foo ORDER BY x; |
In the |EXPLAIN| output, am I supposed to see that the order index is indeed used? I currently do see an |algebra.sort| operation, of course, but do not see any reference to the |foo_x| index. I had expected to find an |bat.getorderidx| operation in the MAL program.
Can anyone shed light on this? I'd be grateful.
Cheers,
—Torsten
-- | Prof. Dr. Torsten Grust | Database Systems — Universität Tübingen (Germany) | ✉︎ torsten.grust@uni-tuebingen.de mailto:torsten.grust@uni-tuebingen.de | db.inf.uni-tuebingen.de http://db.inf.uni-tuebingen.de
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list