[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Dominique Devienne
On Fri, May 15, 2015 at 8:34 PM, Eric Hill wrote: > Is there something I can do to make the debugger work? > See this thread: http://sqlite.1065341.n5.nabble.com/Windows-Specific-2-c-files-Amalgamation-td67626.html Basically, use a multi-file amalgamation, that uses files with fewer than 64K

[sqlite] Please explain SQLiteConnection.GetSchema restrictionValues

2015-05-15 Thread Joe Mistachkin
I just updated the documentation with more details, here: https://system.data.sqlite.org/index.html/ci/4be7ad3120577d30?sbs=0 -- Joe Mistachkin

[sqlite] Please explain SQLiteConnection.GetSchema restrictionValues

2015-05-15 Thread William Drago
All, I'm using SQLiteConnection.GetSchema, and it is working, but I don't really understand why. Can anyone explain or point me to an explanation of how restrictionValues are used in that method? There's no explanation in SQLite.NET.chm and the little bit I could find on line is not very

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Eric Hill
Thanks for your reply. I went as high as using (number of rows)^4, resulting in a cost of ~440 trillion for the unindexed case, along with setting the cost to 1 for the indexed case, and it still won't use my index. I'd like to step out of my xBestFilter implementation into SQLite code to see

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Sairam Gaddam
On Fri, May 15, 2015 at 4:46 PM, Hick Gunter wrote: > The keyword "static" before a function name limits its visibility to the > current source file. > > But many of the PRIVATE functions are not declared static like the > "sqlite3VdbePrintOp" function. If they do declare, can i know where they

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Sairam Gaddam
On Fri, May 15, 2015 at 4:42 PM, Simon Slavin wrote: > > > By not declaring them in the header file you're meant to be using ? > But I think they are declared in the header. > > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Sairam Gaddam
On Fri, May 15, 2015 at 3:53 PM, Hick Gunter wrote: > SQLITE_PRIVATE means that the function is PRIVATE. How they achieved PRIVATE functions in C? You are not allowed to call this function, it is not supported as part of > the SQLite API. Because you are not allowed to call the function

[sqlite] Can I define collation-aware SQL functions?

2015-05-15 Thread Richard Hipp
On 5/15/15, Zsb?n Ambrus wrote: > Dear SQLite list, > > A few of the built-in SQL functions of SQLite has a result that > depends on the collation sequence of the arguments, and compare text > values using these collation functions. These functions are "min" and > "max" (both aggregate and

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Eric Hill
Hey, Let me say up front that I'm sure this is my fault. I have SQLite version 3.8.9. I am using virtual tables, and I am trying to get xBestIndex and xFilter doing the right things so that I get optimal queries. Currently, I am working on the following query: SELECT

[sqlite] Docs suggestion - Attach

2015-05-15 Thread Jonathan Moules
Thanks! Hopefully that'll save someone 5-10 minutes one day. :-) It's surprising how few examples of "ATTACH" that are out there include "DETACH" too. -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Eduardo Morras
On Fri, 15 May 2015 17:13:32 +0530 Sairam Gaddam wrote: > On Fri, May 15, 2015 at 4:46 PM, Hick Gunter wrote: > > > The keyword "static" before a function name limits its visibility > > to the current source file. > > > > But many of the PRIVATE functions are not declared static like the > >

[sqlite] Docs suggestion - Attach

2015-05-15 Thread Jonathan Moules
Hi, A relatively simple suggestion for the ATTACH doc page - https://sqlite.org/lang_attach.html - can it include a link to DETACH (https://www.sqlite.org/lang_detach.html)? I ask because if you don't know what the syntax is (the word "DETACH"), it's a pain to find out (in my case I

[sqlite] VBA Sqllite blob data

2015-05-15 Thread Daniel Sjödin
Hi Preston, That's good news. It would be really interesting to hear how you solved it. Din you hit any particular obstacles? BR Daniel Thank you for all of your suggestions and tips. I have been able to use the code samples and extract the data that I needed from my database in a test

[sqlite] VBA Sqllite blob data

2015-05-15 Thread Preston King
Hi Daniel, I received several suggestions but the one that eventually help me the most was this one, https://sqliteforexcel.codeplex.com/. I spent a fair amount of time reviewing the code contained in the worksheet. I then started modifying it to access a copy of my database. After some trial

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Simon Slavin
On 15 May 2015, at 12:43pm, Sairam Gaddam wrote: > If they do declare, can i know where they did that? Search your project and find out where your compiler is picking up the function name from. But as Hick answered you previously, you should not call that function. It may change or

[sqlite] Virtual Table query - why isn't SQLite using my indexes?

2015-05-15 Thread Richard Hipp
On 5/15/15, Eric Hill wrote: > > So, in the first case, I do not create an index (which I signify by setting > idxNum to -999), and I set the cost (and, est. rows) to 4581. In the second > case, I create an index (0) and set cost to log10(4581) = 3.66 and est. rows > to 4. Yet, later, whenever

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Simon Slavin
On 15 May 2015, at 12:10pm, Sairam Gaddam wrote: > How they achieved PRIVATE functions in C? By not declaring them in the header file you're meant to be using ? Simon.

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Hick Gunter
The keyword "static" before a function name limits its visibility to the current source file. -Urspr?ngliche Nachricht- Von: Sairam Gaddam [mailto:gaddamsairam at gmail.com] Gesendet: Freitag, 15. Mai 2015 13:10 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Regarding

[sqlite] Docs suggestion - Attach

2015-05-15 Thread Richard Hipp
Change implemented now on the website. On 5/15/15, Jonathan Moules wrote: > Hi, > A relatively simple suggestion for the ATTACH doc page - > https://sqlite.org/lang_attach.html - can it include a link to DETACH > (https://www.sqlite.org/lang_detach.html)? I ask because if you don't

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Hick Gunter
SQLITE_PRIVATE means that the function is PRIVATE. You are not allowed to call this function, it is not supported as part of the SQLite API. Because you are not allowed to call the function directly, it is not made available to the linker. You can call it indirectly through the EXPLAIN feature.

[sqlite] FTS5

2015-05-15 Thread Milan Kříž
Hello, I've found that SQLite is preparing new FTS5 extension, which could be better than current FTS3/4. If it is still in development, I would like to propose one more change. In our project we would need possibility to specify which columns should be matched by the match operator. We use

[sqlite] xBestIndex() implementation question

2015-05-15 Thread Hick Gunter
You are not supposed to know the value on the RHS because that would lure you into performing lots of work that you should not be doing in the query planning step. Remember that xBestIndex may be called multiple times with different combinations of constraints. Running the equivalent of "select

[sqlite] Regarding SQLITE_PRIVATE

2015-05-15 Thread Richard Hipp
On 5/15/15, Sairam Gaddam wrote: > http://pastebin.com/yLx1L0uu > > When I run the above program, I got the following error > > undefined reference to `sqlite3VdbePrintOp' > > since the "sqlite3VdbePrintOp" function is SQLITE_PRIVATE > But when I change SQLITE_PRIVATE to SQLITE_API, I was able to