I'm considering using a virtual table to query an external-to-SQLite data
store. However, I've carefully read about the xBestIndex method, and it appears
that virtual tables cannot have indexes on expressions; or rather that the
SQLite query engine can't make use of such indexes, only indexes
The documentation says that "The difference is that xConnect is called to
establish a new connection to an existing virtual table whereas xCreate is
called to create a new virtual table from scratch." But this leaves me
unclear on the circumstances where xConnect would be called (assuming I
have a
Folks,
I cannot seem to find a means of filtering on negated operators, e.g. <>,
not null, not like, etc., in the xBestIndex() method for virtual vables. As
best as I can tell, I cannot, unless there is something I am missing, hence
this inquiry.
In a few virtual tables I have implemented, I
First, thanks in advance for any help offered.
I'm pretty comfortable using sqlite but just now starting to develop
with virtual tables.
I'm running into troubles and I'm pretty sure it's because my mental
model of sqlite is wimpy.
I'm trying to build a tool that interfaces to C++ objects in
Hi folks,
I am trying to fully understand the impact and correct use of a few subtle
features related to virtual tables' the xBestIndex mechanism, and their
correct use. Here are my current beliefs:
* pIdxInfo->estimatedCost
obviously the cost of the proposed plan; a metric of the
6 dec 2015, Charles Leifer:
> In working on a Python wrapper around virtual tables, I thought it
> might be
> beneficial if SQLite provided an official C API for creating simple
> table-valued functions. The wrapper could build on the existing
> virtual
> table APIs and would consist of:
>
>
In working on a Python wrapper around virtual tables, I thought it might be
beneficial if SQLite provided an official C API for creating simple
table-valued functions. The wrapper could build on the existing virtual
table APIs and would consist of:
* user supplied list of parameters, which would
Kennedy
Sent: Thursday, June 11, 2015 1:14 AM
To: sqlite-users at mailinglists.sqlite.org
Subject: Re: [sqlite] Virtual tables/xBestIndex: Is this a bug?
On 06/11/2015 03:49 AM, Eric Hill wrote:
> Is it a bug that SQLite changes the order of the constraints passed to
> xBestIndex based
On 06/11/2015 03:49 AM, Eric Hill wrote:
> Is it a bug that SQLite changes the order of the constraints passed to
> xBestIndex based merely on the order of the ON clause, when SQL (AFAIK) says
> nothing about what the order of the ON clause should be?
No. The order is undefined.
However, it is
Hey,
This is a follow-up from the thread entitled "Virtual Table query - why isn't
SQLite using my indexes?" in order to raise the visibility of this issue:
Consider this SQL, where all of the tables involved are virtual:
SELECT t2.rental_id, t2.rental_date, t1.film_id, t3.title,
Hi there,
Since virtual tables were recenty mentioned in the thread "SQLite as a
meta database" , I take this opportunity to announce that the lastest
version of the DBD::SQLite driver for Perl now has support for virtual
tables (see https://metacpan.org/pod/DBD::SQLite ).
This means that
Hi,
I need (and have attempted to add) limited support for foreign key
constraints mapping to virtual tables. It seems this is not possible
currently in sqlite, or at least, it gives me "foreign key mismatch" when I
try.
My use-case is this:
create virtual table vtbl using vtblXYZ;
create
James K. Lowden wrote:
> Clemens Ladisch wrote:
>>> Is there a way to force rows to be dispatched (using the group by)
>>> and aggregated on the fly instead of being stored, sorted and then
>>> aggregated?
>>
>> SQLite can optimize GROUP BY this way only if it can prove that
On Thu, 19 Dec 2013 12:03:48 +0100
Clemens Ladisch wrote:
> > Is there a way to force rows to be dispatched (using the group by)
> > and aggregated on the fly instead of being stored, sorted and then
> > aggregated?
>
> SQLite can optimize GROUP BY this way only if it can
...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Clemens Ladisch
Sent: jeudi 19 décembre 2013 12:43
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] virtual tables and group by: how could we prevent to
retrieve all rows from a vtab and sort them later ?
Hick Gunter wrote:
>
Hick Gunter wrote:
> You are in error on number 4.
>
> SQLite reads your CFL table once and performs the aggregation in
> a temporary table that holds 1 entry per "contract" i.e. about
> 1000 rows of max 16 byte records which I estimate to using less than
> 64k.
>
> For each record read, SQLite
or insert the matching row in the
temporary table.
-Ursprüngliche Nachricht-
Von: Perrin, Lionel [mailto:lionel.per...@moodys.com]
Gesendet: Mittwoch, 18. Dezember 2013 14:58
An: sqlite-users@sqlite.org
Betreff: [sqlite] virtual tables and group by: how could we prevent to retrieve
all rows f
Perrin, Lionel wrote:
> I plan to use sqlite to implement an 'aggregation tool'. Basically,
> the design would be the following:
>
> 1. I implement a virtual table CFL(contract, amount) which may provide
>up to 1 billion unsorted rows.
>
> 2. The aggregation phasis will be defined at run time
Hello,
I plan to use sqlite to implement an 'aggregation tool'. Basically, the design
would be the following:
1. I implement a virtual table CFL(contract, amount) which may provide up
to 1 billion unsorted rows.
2. The aggregation phasis will be defined at run time and may
Thanks OBones!
Your link gave me the solution to why my code didn't work!
It was (of course) I who made an error in translating function
parameters from C to Pascal!
Best regards!
/Jörgen
sqlite-users-requ...@sqlite.org skrev 2012-09-24 18:00:
Re: [sqlite] Virtual tables are driving me
Hello,
have a look at what's here:
http://code.google.com/p/sv-utils/wiki/Intro
There is a complete and unit tested encapsulation for SQlite and its
virtual tables.
Regards
___
sqlite-users mailing list
sqlite-users@sqlite.org
On Fri, Sep 21, 2012 at 11:44:09PM +0200, Jörgen Hägglund scratched on the wall:
> I tried creating a super simple test which just return "default"
> values on all calls.
> This is the order my functions are being called:
> xCreate (enter function)
> xCreate (exit function)
> xConnect (enter
Jörgen Hägglund wrote:
> I'm trying to implement virtual tables, but I seem to be in over
> my head with this.
> I get an access violation in SQLite3.dll (reading of address 0008)
>
> Does anyone have any ideas to what I'm doing wrong?
Not really. But one mistake I had made was to read this
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 21/09/12 14:44, Jörgen Hägglund wrote:
> At this point I get an access violation in SQLite3.dll (reading of
> address 0008)
You are reading the third member of a structure that is NULL.
You should use a debugger that catches this sort of
Hi all!
First off, my configuration:
Windows 7 Ultimate x64
SQLite3 v3.7.14 Amalgamation, compiled to DLL using VS2010
Used directives:
SQLITE_4_BYTE_ALIGNED_MALLOC (*)
SQLITE_THREADSAFE=2
SQLITE_OMIT_DEPRECATED
SQLITE_DEBUG (*)
SQLITE_MEMDEBUG (*)
(*)
On Thu, Jul 12, 2012 at 03:05:39PM +0200, OBones scratched on the wall:
> Hello again.
>
> Does anyone have any suggestion here?
There is a footnote in "Using SQLite" (Chapter 10: "Virtual Tables and
Modules," p242) on this.
The text is:
If you do need to support your own
Hello,
Is there a place where I should enter such a documentation request?
Regards
Olivier
OBones wrote:
Hello all,
As I'm moving forward in my usage of virtual tables, I'm using the
xFindFunction method to overload some functions with my own
implementation.
That works just fine, but I
Hello again.
Does anyone have any suggestion here?
Regards
Olivier
OBones wrote:
Hello all,
I'm pushing my experiment with virtual tables a bit further by trying
out the transaction functions.
As a result, I gave values for the xBegin, xSync, xCommit and
xRollback members of my
Jay A. Kreibich wrote:
On Tue, Jun 26, 2012 at 03:56:33PM +0200, OBones scratched on the wall:
Hello all,
As I'm experimenting with Virtual Tables, I have had to implement
xBestIndex and xFilter.
The documentation says that idxNum and idxStr are of no importance
to the SQLite core and that
Jay A. Kreibich wrote:
On Tue, Jun 26, 2012 at 03:47:07PM +0200, OBones scratched on the wall:
I would have thought that since the disconnect was given a valid
pVTab, this one could have been given back to xConnect when
reconnecting the database after its rename.
Except SQLite doesn't store
On Tue, Jun 26, 2012 at 03:56:33PM +0200, OBones scratched on the wall:
> Hello all,
>
> As I'm experimenting with Virtual Tables, I have had to implement
> xBestIndex and xFilter.
> The documentation says that idxNum and idxStr are of no importance
> to the SQLite core and that it's our
On Tue, Jun 26, 2012 at 03:47:07PM +0200, OBones scratched on the wall:
> Hello all,
>
> I'm experimenting with virtual tables and I must say that it's a
> very nice feature to have, it saves me from inserting millions of
> records in a database when I can simply map the source file in
> memory
Hello all,
I'm pushing my experiment with virtual tables a bit further by trying
out the transaction functions.
As a result, I gave values for the xBegin, xSync, xCommit and xRollback
members of my sqlite3_module structure.
Then after having registered the module, I sent those two statements:
Hello all,
As I'm moving forward in my usage of virtual tables, I'm using the
xFindFunction method to overload some functions with my own implementation.
That works just fine, but I stumbled upon a hurdle that was not obvious
to solve at first glance.
Inside the xFindFunction, you can give a
Hello all,
As I'm experimenting with Virtual Tables, I have had to implement
xBestIndex and xFilter.
The documentation says that idxNum and idxStr are of no importance to
the SQLite core and that it's our responsibility to make sure xFilter
and xBestIndex agree on the meaning.
This is fine by
Hello all,
I'm experimenting with virtual tables and I must say that it's a very
nice feature to have, it saves me from inserting millions of records in
a database when I can simply map the source file in memory and read it
directly.
However, I have a small issue when renaming a database.
On 10/25/2011 04:28 PM, Alexey Pechnikov wrote:
2011/10/25 Dan Kennedy:
Not possible. The Tcl interface has no bindings for either the
virtual table or VFS interfaces.
But why? Is there any technical/ideological problems?
None that are insurmountable, I would think.
2011/10/25 Dan Kennedy :
> Not possible. The Tcl interface has no bindings for either the
> virtual table or VFS interfaces.
But why? Is there any technical/ideological problems?
--
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
On 10/25/2011 02:31 PM, sqlite-us...@h-rd.org wrote:
Hi,
I have some questions on virtual tables and tcl compared to perl and
python/apsw.
As I understand you can build your own virtual table implementation with
apsw (and also with perl). Is this also possible with tclsqlite?
Any pointers
Hi,
I have some questions on virtual tables and tcl compared to perl and
python/apsw.
As I understand you can build your own virtual table implementation
with apsw (and also with perl). Is this also possible with tclsqlite?
Any pointers greatly appreciated, I could not find it in the
On 05/04/2011 08:58 PM, Schrum, Allan wrote:
> Hi Folks,
>
> Using virtual tables the WHERE clause is broken up and sent to the "best
> index" function to determine the best index. Then the "filter" function is
> called to perform the actual work. I've noticed that the SQLITE engine seems
> to
Hi Folks,
Using virtual tables the WHERE clause is broken up and sent to the "best index"
function to determine the best index. Then the "filter" function is called to
perform the actual work. I've noticed that the SQLITE engine seems to process
OR clauses outside of the virtual table process,
On 23 November 2010 17:39, Roger Binns wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 11/23/2010 02:04 AM, Vivien Malerba wrote:
>> The Libgda library (http://www.gnome-db.org) uses virtual tables
>
> Are you sure? It looks like an abstraction layer that
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/23/2010 02:04 AM, Vivien Malerba wrote:
> The Libgda library (http://www.gnome-db.org) uses virtual tables
Are you sure? It looks like an abstraction layer that sits above several
databases, with similar functionality to ODBC/JDBC.
We are
The Libgda library (http://www.gnome-db.org) uses virtual tables to
enable one to execute statements on several tables from several
database backends (SQlite, PostgreSQL, MySQL, Oracle, Jdbc, SqlCipher,
MDB) and CSV files.
Regards,
Vivien
___
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/22/2010 06:59 PM, dcharno wrote:
> What are some of the things that people use virtual tables for? Are
> there any good example usages?
FTS3 uses them. Various CSV extensions do too.
With my APSW package I include a virtual table that lets
]
On Behalf Of dcharno
Sent: 23 November 2010 05:00 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] virtual tables
What are some of the things that people use virtual tables for? Are
there any good example usages?
___
sqlite-users mailing list
sqlite-users
Am Montag, den 22.11.2010, 21:59 -0500 schrieb dcharno:
> What are some of the things that people use virtual tables for? Are
> there any good example usages?
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
>
What are some of the things that people use virtual tables for? Are
there any good example usages?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Got that one two, thanks, this mail list saves time.
On 5/6/10, Jay A. Kreibich wrote:
> On Thu, May 06, 2010 at 12:31:26AM -0700, Matt Young scratched on the wall:
>
>> Can I create a virtual table mapped to an existing table in my
>> database?
>
> You'll need to write a fair
On Thu, May 06, 2010 at 12:10:56PM -0700, Trey Jackson scratched on the wall:
> So I was looking at the Virtual Table http://www.sqlite.org/vtab.html
> Anyway, can someone provide history on how much has it has changed over
> releases, when it was introduced? Just so I have some contextual
On Thu, May 06, 2010 at 12:31:26AM -0700, Matt Young scratched on the wall:
> Can I create a virtual table mapped to an existing table in my
> database?
You'll need to write a fair amount of code, but yes.
> Does this let me alias a whole table?
It lets you do pretty much anything you
I don't think there is anything in the vanilla sqlite to do this, but...
Have a look at src/test8.c in the main (not amalgamation) source code...
this may give you some ideas. I don't think it does what you want exactly,
but a quick skim through makes me think it has some pointers in the right
Can I create a virtual table mapped to an existing table in my
database? Does this let me alias a whole table? Thinking out loud,
does this give me ability to write a query on the virtual table, then
remap the virtual table to a current table and execute the query?
Hello!
This query produce full-scan of the FTS3 virtual table 'data':
sqlite> select count(*) from data where rowid in (1);
^CError: interrupted
After 30 minuts I cancel the query.
sqlite> explain query plan select count(*) from data where rowid=1;
0|0|TABLE data VIRTUAL TABLE INDEX 1:
sqlite>
Documentation error and/or bug:
http://sqlite.org/vtab.html#xsync
"This method is only invoked after call to the xBegin method..."
Not true (3.6.20). An xSync/xCommit pair is given after the initial
xCreate call. I'm not sure if that is intentional or not.
-j
--
Jay A.
On Wed, Aug 5, 2009 at 5:37 PM, Lukas Haase wrote:
> Hi list,
>
> I have a huge problem: A database with 2 HTML fragements should
> contain a fulltext index. For that reason I put all data into a virtual
> table:
>
> CREATE VIRTUAL TABLE topics USING fts3(
> topicID
fts has an implicit index on the docid (aka rowid), and a fulltext
index on the terms in the columns. All columns are treated as TEXT,
you can say INTEGER or VARCHAR, but they are TEXT.
The end of this page:
http://code.google.com/apis/gears/api_database.html
has an example of how you might
Hi list,
I have a huge problem: A database with 2 HTML fragements should
contain a fulltext index. For that reason I put all data into a virtual
table:
CREATE VIRTUAL TABLE topics USING fts3(
topicID INTEGER,
topic_title VARCHAR(200) COLLATE NOCASE,
topic TEXT,
On Sat, 13 Sep 2008 18:36:26 +0200, you wrote:
>Exactly Stephen! I was trying to dump a database and I was wondering
>how to deal with virtual tables.
>
>I think that a good way to dump a database skipping internally
>generated real tables could be to:
>- first create all tables that contains
Exactly Stephen! I was trying to dump a database and I was wondering
how to deal with virtual tables.
I think that a good way to dump a database skipping internally
generated real tables could be to:
- first create all tables that contains the CREATE VIRTUAL TABLE
statement
- then get the
Kishor,
I think Marco may want to be able to know how to determine which tables
in a DB are real tables and which ones below to virtual tables. If you
want to do something like dump tables from the database, you do not want
to be dumping all the internally generated real tables. It might be
On 9/13/08, Marco Bambini <[EMAIL PROTECTED]> wrote:
> Yes but creating a virtual tables involves the creations of other
> related tables ...
Well, the FTSn mechanism does all the extra table voodoo for you, so
you don't have to be bothered about it. From what it seems like, the
other magic
Yes but creating a virtual tables involves the creations of other
related tables ... does all the virtual table implementations (fts1,
fts2, fts3) follow the same schema or it is implementation dependent?
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
On 9/13/08, Marco Bambini <[EMAIL PROTECTED]> wrote:
> What is the best way to identify virtual tables inside a sqlite
> database?
isn't the schema enough? In my world it says
CREATE VIRTUAL TABLE ...
>
> Thanks a lot.
> ---
> Marco Bambini
> http://www.sqlabs.net
>
What is the best way to identify virtual tables inside a sqlite
database?
Thanks a lot.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/
___
sqlite-users mailing list
sqlite-users@sqlite.org
Aladdin
> Date: Mon, 5 May 2008 09:59:52 -0500
> From: [EMAIL PROTECTED]
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Virtual tables declaration statements
>
> Don't think that will happen. "Dot" notation is used as in
> "databasename.tablena
AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Virtual tables declaration statements
Hi list!
I've just finished a set of sqlite3 virtual tables and I would like to name
them with a "dot notation", ie "data.source1", "data.source2" created like
that:
sqlite3_create_module(
Hi list!
I've just finished a set of sqlite3 virtual tables and I would like to name
them with a "dot notation", ie "data.source1", "data.source2" created like that:
sqlite3_create_module(db, "data.source1", , 0);
sqlite3_create_module(db, "data.source2", , 0);
... and then use the following
We've begun implementing some virtual tables with latest SQLite build
and run into a few questions performance-wise, all these questions
revolve around the same issue (join performance).
1) Is there a way to know which fields are going to be potentially
requested by xColumn? For instance if I
In the documentation for sqlite3_enable_shared_cache it says:
** Virtual tables cannot be used with a shared cache. When shared
** cache is enabled, the [sqlite3_create_module()] API used to register
** virtual tables will always return an error.
Just curious why is there such a
"Michael Brehm" <[EMAIL PROTECTED]> wrote:
> Hi again, still working on my Virtual Table implementation/object model
> here, and I have a question about the relationship between xOpen and
> xFilter. By perusing the code and playing around with some sample
> statements, it looks to me like there
Hi again, still working on my Virtual Table implementation/object model
here, and I have a question about the relationship between xOpen and
xFilter. By perusing the code and playing around with some sample
statements, it looks to me like there will only be one call to xFilter for
any given
hi,
Is it possible to add some informations about locking
mechanism in the wiki page VirtualTables?
I'm facing concurrency problem in developing a cluster
Sqlite database. One table per database. Multiple databases
indexed like x.db, x.db-001, x.db-002, x.db-003, ... each
containing a choosen
Gerry Snyder wrote:
BTW, I really liked the video presentation mentioned on the list
recently, not least because I had not been sure how to pronounce
SQLite (I had thought it might be ESS CUE LITE instead of the proper
ESS CUE ELL (L)ITE)
Well, that's really only one person's opinion of
[EMAIL PROTECTED] wrote:
http://www.sqlite.org/cvstrac/wiki?p=VirtualTables
This is a feature currently under active development.
--
D. Richard Hipp <[EMAIL PROTECTED]>
Wow!
I really look forward to the day when this and full-text search are
ready for prime-time use (including
Matthew Jones wrote:
Is there any straight forward way I could use SQLite3 with virtual
tables. By that I mean SQLite contains all the table and index
definitions but none of the data - actually it will contain the data
for some tables but not others. I only need to query access to the
tables
Matthew Jones <[EMAIL PROTECTED]> wrote:
> Is there any straight forward way I could use SQLite3 with virtual
> tables. By that I mean SQLite contains all the table and index
> definitions but none of the data - actually it will contain the data for
> some tables but not others. I only need to
Is there any straight forward way I could use SQLite3 with virtual
tables. By that I mean SQLite contains all the table and index
definitions but none of the data - actually it will contain the data for
some tables but not others. I only need to query access to the tables so
I need to
79 matches
Mail list logo