Search code examples
databaseindexingmonetdb

How to tell MonetDB that data are sorted in the table?


Given a table data (as described below) and given the insurance that that values imported into this table are sorted.

CREATE TABLE data (INT value) 
CREATE INDEX index_value ON data (value)

Since MonetDB can neglect the CREATE INDEX statement (see details here). How do I tell MonetDB that data are sorted in order to let him improves lookup operations ?


Solution

  • From https://www.monetdb.org/pipermail/users-list/2015-March/007932.html (edited) :

    MonetDB will detect it automagically. Just make sure the data is indeed ordered upon load. You can check it using the call

    select "column","sorted" from storage() where "table"='yourtable';
    

    which contains a column indicating whether MonetDB detected the sorted order.

    Please don't double-post both here and on the MonetDB mailing list.