Search code examples
rrsqlite

rsqlite create index


I have been trying to use the RSQLite (with DBI) to create a database in R but i have millions of rows and i would like to create an index to speed up the queries. Unfortunately i haven't been able to find a way to do this with the library. Is there a way or another library that can be used to do this ?


Solution

  • You can do it directly with RSQLite

    library(RSQLite)
    ...
    dbExecute(con, 'CREATE INDEX idx_adl ON adltable(x)')