Re: [sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-25 Thread Steinar Midtskogen
I did implement what I described below, which I believed to work well unless it is the first row that needs the biggest buffer. However, I ran into a problem. I keep getting incorrect results when I use the coalesce() function. Usually coalesce() will simply return the first argument, and if

Re: [sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-24 Thread Dan Kennedy
On 02/24/2012 02:02 PM, Steinar Midtskogen wrote: Hello Is it possible to find out in xFilter or xBestIndex which columns were selected? That is, if I do SELECT a, b, c FROM t where t is a virtual table, I would like to know in xFilter or xBestIndex that the result will only consist of the

Re: [sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/02/12 23:02, Steinar Midtskogen wrote: I know that xColumn will only get called for these columns. As Dan said there isn't a direct way of knowing. There is a reasonably convenient workaround of having multiple virtual tables with different

Re: [sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-24 Thread Steinar Midtskogen
Thanks to Dan and Roger for the information and suggestions. I have about 100 columns (and millions of rows), but usually queries will only ask for a few columns. I think I know a way to work around this for my case. Basically, I don't know the exact size required for my lookahead buffer

[sqlite] xFilter or xBestIndex needs to know which columns were selected

2012-02-23 Thread Steinar Midtskogen
Hello Is it possible to find out in xFilter or xBestIndex which columns were selected? That is, if I do SELECT a, b, c FROM t where t is a virtual table, I would like to know in xFilter or xBestIndex that the result will only consist of the rows a, b and c. I know that xColumn will only get