very early draft of sqlite based index