Re: [sqlite] Reserve database pages

2010-08-13 Thread Max Vlasov
I can approximately calculate, how big the new database will grow. Is there a way to tell SQLite to reserve an inital space or numer of pages instead of letting the database file grow again and again? Thought about this recently. Another idea is to tweak VFS. Since xWrite method is supposed

Re: [sqlite] Reserve database pages

2010-08-13 Thread Max Vlasov
On Fri, Aug 13, 2010 at 1:38 PM, Max Vlasov max.vla...@gmail.com wrote: I can approximately calculate, how big the new database will grow. Is there a way to tell SQLite to reserve an inital space or numer of pages instead of letting the database file grow again and again? Thought about

Re: [sqlite] Reserve database pages

2010-08-13 Thread Dan Kennedy
On Aug 13, 2010, at 8:41 PM, Max Vlasov wrote: On Fri, Aug 13, 2010 at 1:38 PM, Max Vlasov max.vla...@gmail.com wrote: I can approximately calculate, how big the new database will grow. Is there a way to tell SQLite to reserve an inital space or numer of pages instead of letting the

[sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Peng Yu
Hi, Suppose that I have a table A, each row represents a interval. For example, the first row represents an interval [1,10) with a name a. The first and second rows are considered overlapping because the interval [1,10) and interval [5,15) intersect and both rows have the same name a. name left

Re: [sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Jim Morris
Did you try something like(pseudo code): select * from A inner join B on A.name = B.name AND ( B.left between(A.left,A.right) OR B.right between(A.left,A.right) ) On 8/13/2010 8:07 AM, Peng Yu wrote: Hi, Suppose that I have a table A, each row represents a interval. For example, the first

Re: [sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Simon Davies
On 13 August 2010 16:07, Peng Yu pengyu...@gmail.com wrote: Hi, Suppose that I have a table A, each row represents a interval. For example, the first row represents an interval [1,10) with a name a. The first and second rows are considered overlapping because the interval [1,10) and interval

[sqlite] Distinct Bug

2010-08-13 Thread Andy Chambers
Is this a bug? create table t_distinct_bug ( a, b, c ); insert into t_distinct_bug values ('1', '1', 'a'); insert into t_distinct_bug values ('1', '2', 'b'); insert into t_distinct_bug values ('1', '3', 'c'); insert into t_distinct_bug values ('1', '1', 'd'); insert into t_distinct_bug

Re: [sqlite] Distinct Bug

2010-08-13 Thread Simon Davies
On 13 August 2010 16:34, Andy Chambers achambers.h...@gmail.com wrote: Is this a bug? create table t_distinct_bug (  a,  b,  c ); insert into t_distinct_bug values ('1', '1', 'a'); insert into t_distinct_bug values ('1', '2', 'b'); insert into t_distinct_bug values ('1', '3', 'c');

Re: [sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Pavel Ivanov
I don't understand where do you see a problem but it looks like this join will do what you want: select * from A, B where A.name = B.name and A.left B.right and A.right B.left I could use an external program (such as python sqlite package) to enumerate all the named interval from table A and

[sqlite] Is there a table that show all the available function from sqlite3?

2010-08-13 Thread Peng Yu
Hi, http://www.sqlite.org/docs.html I don't see a table that shows all the available functions in sqlite3. Would you please let me know if there is such a table? -- Regards, Peng ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Peng Yu
On Fri, Aug 13, 2010 at 11:32 AM, Pavel Ivanov paiva...@gmail.com wrote: I don't understand where do you see a problem but it looks like this join will do what you want: select * from A, B where A.name = B.name and A.left B.right and A.right B.left I could use an external program (such

Re: [sqlite] Is there a table that show all the available function from sqlite3?

2010-08-13 Thread Adam DeVita
Are you looking for http://www.sqlite.org/c3ref/funclist.html ? On Fri, Aug 13, 2010 at 12:37 PM, Peng Yu pengyu...@gmail.com wrote: Hi, http://www.sqlite.org/docs.html I don't see a table that shows all the available functions in sqlite3. Would you please let me know if there is such a

Re: [sqlite] Is there a table that show all the available function from sqlite3?

2010-08-13 Thread Jay A. Kreibich
On Fri, Aug 13, 2010 at 11:37:59AM -0500, Peng Yu scratched on the wall: Hi, http://www.sqlite.org/docs.html I don't see a table that shows all the available functions in sqlite3. Would you please let me know if there is such a table? There is not. As far as I know, there is no way to

Re: [sqlite] Is there a table that show all the available function from sqlite3?

2010-08-13 Thread Dan Kennedy
On Aug 13, 2010, at 11:37 PM, Peng Yu wrote: Hi, http://www.sqlite.org/docs.html I don't see a table that shows all the available functions in sqlite3. Would you please let me know if there is such a table? http://www.sqlite.org/lang_corefunc.html

Re: [sqlite] Is there a way to inner join on named intervals?

2010-08-13 Thread Pavel Ivanov
My next question is what index I should create on table A and B to speed up such an inner join? Are indexes on each of the first three column of each table enough? What is the best comparison (along with the appropriate indexes) in term of the performance? Indexes on each field never help.

Re: [sqlite] Distinct Bug

2010-08-13 Thread Dan Kennedy
On Aug 13, 2010, at 10:34 PM, Andy Chambers wrote: Is this a bug? create table t_distinct_bug ( a, b, c ); insert into t_distinct_bug values ('1', '1', 'a'); insert into t_distinct_bug values ('1', '2', 'b'); insert into t_distinct_bug values ('1', '3', 'c'); insert into

Re: [sqlite] Documentation for Prev. Versions

2010-08-13 Thread Jon Polfer
DRH - Thanks for the docs; you are very kind. -Jon On Thu, Aug 12, 2010 at 11:59 AM, Jon Polfer jpol...@forceamerica.comwrote: Is there a way to get at the documentation for previous versions of SQLite? I'm running 3.5.9, and don't have much of an opportunity to upgrade. Is there a way