Re: [sqlite] Updated FTS3 compression patch

2010-03-18 Thread Simon Slavin
On 18 Mar 2010, at 4:35pm, Alexey Pechnikov wrote: > sqlite> select count(*) from file_text; > 8430 > CPU Time: user 0.508032 sys 0.012000 Try counting just the primary key. Suppose your primary key is a column called 'id', try SELECT COUNT(id) FROM file_text Simon.

[sqlite] Updated FTS3 compression patch

2010-03-18 Thread Alexey Pechnikov
Hello! I did rewrite the subj and now my test database is 4.6x smaller. It's fine, of cource. But there is the problem with speed of count(*) query: sqlite> select count(*) from file_text; 8430 CPU Time: user 0.508032 sys 0.012000 sqlite> select count(*) from file_text_content; 8430 CPU Time:

Re: [sqlite] state of wrappers

2010-03-18 Thread Vance E. Neff
I am also interested as to which Java JDBC wrappers are good. I have used the zentus wrapper for a very basic application and it worked OK. I could not get it to register as a desktop database application in Netbeans (6.5); but, that wasn't a problem for that simple application. But, I am

Re: [sqlite] All ancestors / descendents of a vertex in sqlite?

2010-03-18 Thread Jean-Christophe Deschamps
>I have a (small) directed graph which I would be able to fins all >ancestors or descendents of a certain vertex (transitive closure?). >So, using this graph: > >CREATE TABLE levels_levels (parent_id INTEGER ,child_id INTEGER, >UNIQUE(parent_id, child_id)); >INSERT INTO "levels_levels"

Re: [sqlite] All ancestors / descendents of a vertex in sqlite?

2010-03-18 Thread Jay A. Kreibich
On Thu, Mar 18, 2010 at 10:05:20AM +0100, Fredrik Karlsson scratched on the wall: > Dear list, > > I have a (small) directed graph which I would be able to fins all > ancestors or descendents of a certain vertex (transitive closure?). > So, using this graph: > > CREATE TABLE levels_levels

Re: [sqlite] How to patch several sql words into one words

2010-03-18 Thread Igor Tandetnik
liubin liu wrote: > I want to insert several pieces of data (include blob) into a table in a > transaction by programing in C language , like: > char *sql[n+2]; > > sql[0] = sqlite3_mprintf ("BEGIN;"); > > char *sql_f = "INSERT OR REPLACE INTO collstate VALUES (%d, %d, ?);"; Why don't you use

Re: [sqlite] All ancestors / descendents of a vertex in sqlite?

2010-03-18 Thread Simon Slavin
On 18 Mar 2010, at 9:05am, Fredrik Karlsson wrote: > I would like to make it possible to find 10 as a descendent of 8 and 6 > as a parent of 9 (for instance). > I have found a couple of procedural solutions using procedural calls > in sql server or postgresql, but is there a solution that I

[sqlite] database optimization issues.

2010-03-18 Thread Felipe Aramburu
Here is an example of some tables which I am having very poor performance querying. I was wondering if someone could give me some suggestions as to how I can optimize this. I am using the adobe Air framework (AS3) to access the database. I make the connection to the file like this:

[sqlite] All ancestors / descendents of a vertex in sqlite?

2010-03-18 Thread Fredrik Karlsson
Dear list, I have a (small) directed graph which I would be able to fins all ancestors or descendents of a certain vertex (transitive closure?). So, using this graph: CREATE TABLE levels_levels (parent_id INTEGER ,child_id INTEGER, UNIQUE(parent_id, child_id)); INSERT INTO "levels_levels"

[sqlite] How to patch several sql words into one words

2010-03-18 Thread liubin liu
I want to insert several pieces of data (include blob) into a table in a transaction by programing in C language , like: char *sql[n+2]; sql[0] = sqlite3_mprintf ("BEGIN;"); char *sql_f = "INSERT OR REPLACE INTO collstate VALUES (%d, %d, ?);"; for (i=1; i