Hi Martin,

thanks for the super-quick reply.  You are talking of imprints here but I assume that the same is true for order indexes (these are separate concepts, right?).

Best wishes,  
   —Torsten


On Fri, Feb 16, 2018 at 9:55 AM Martin Kersten <martin.kersten@cwi.nl> wrote:
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
>
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
--
| Prof. Dr. Torsten Grust
| Database Systems — Universität Tübingen (Germany)
| ✉︎ torsten.grust@uni-tuebingen.de
| db.inf.uni-tuebingen.de