Re: [sqlite] Feature request: extend the IN operator

2011-08-07 Thread Edzard Pasma
of the filter much more difficult. A built-in soultion would be welcome. Best regards, Edzard Pasma. SQLite version 3.7.7.1 (APSW 3.7.7.1-r1) Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .schema group_split

Re: [sqlite] Big difference in performance between Python and gcc

2011-06-02 Thread Edzard Pasma
Op 2-jun-2011, om 23:17 heeft Simon Slavin het volgende geschreven: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On 2 Jun 2011, at 7:24pm, Roger Binns wrote: > >> (Incidentally I am the author of a "competing" Python SQLite >> binding and >> hence know exactly which SQLite API calls r

Re: [sqlite] completion of sql words

2011-04-09 Thread Edzard Pasma
Op 9-apr-2011, om 21:29 heeft Roger Binns het volgende geschreven: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 04/08/2011 02:40 PM, Edzard Pasma wrote: >> Just found that the APSW shell does tabcomplete (and even for >> tablenames). It is desc

Re: [sqlite] completion of sql words

2011-04-09 Thread Edzard Pasma
Here is the unbroken link: http://apidoc.apsw.googlecode.com/hg/shell.html ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] completion of sql words

2011-04-08 Thread Edzard Pasma
Op 11-feb-2011, om 23:30 heeft Simon Slavin het volgende geschreven: > > On 11 Feb 2011, at 7:19pm, prad wrote: > >> does the sqlite3 interface have completion of sql key words? >> in postgresql you can type SEL and press tab to complete. >> is there such a thing for sqlite3? > > sqlite3 doesn't h

Re: [sqlite] Permanently disabling AutoCommit

2011-03-24 Thread Edzard Pasma
straightforward and you do not need to know about statement types and their effect on transactions. Edzard Pasma. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] BUG (3.7.5): identifier quotation characters get part of column names for certain statements

2011-02-11 Thread Edzard Pasma
ode line sqlite> select * from (select [x].[a] from (select a from x) x); a = 123 This also cuts off the unnecessary table alias. If column descriptions could be changed to be like this by default? Edzard Pasma ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] specific behavior of busy_timeout with different transaction modes

2010-11-10 Thread Edzard Pasma
On 9-nov-2010, at 18:22 Peter Pawlowski wrote: > While debugging an issue with using SQLite with a Rails > application, we > discovered that the behavior of SQLite when setting the > 'sqlite3_busy_timeout' option was unexpected. > > After reading and grokking the SQLite documentation about lock

Re: [sqlite] WAL still detects deadlock

2010-07-31 Thread Edzard Pasma
Op 31-jul-2010, om 18:30 heeft Dan Kennedy wrote: > > On Jul 31, 2010, at 10:47 PM, Edzard Pasma wrote: > >> Op 31-jul-2010, om 14:16 heeft Dan Kennedy wrote: >> >>> >>> On Jul 31, 2010, at 12:02 AM, Edzard Pasma wrote: >>> >>>>

Re: [sqlite] WAL still detects deadlock

2010-07-31 Thread Edzard Pasma
Op 31-jul-2010, om 14:16 heeft Dan Kennedy wrote: > > On Jul 31, 2010, at 12:02 AM, Edzard Pasma wrote: > >> Hello, >> >> The following scenario raises a BUSY error immediately >> >> process A. keeps a write lock >> process B keeps a read-lock and tri

[sqlite] WAL still detects deadlock

2010-07-31 Thread Edzard Pasma
Hello, The following scenario raises a BUSY error immediately process A. keeps a write lock process B keeps a read-lock and tries to promote this to a write-lock This is the traditional SQLite deadlock situation, detected by the engine as soon as possible. In my test this still occurs unchang

Re: [sqlite] Index not used in simple alias-like views

2010-05-24 Thread Edzard Pasma
Op 24-mei-2010, om 17:59 heeft Dan Kennedy het volgende geschreven: > > On May 24, 2010, at 6:14 PM, Edzard Pasma wrote: > >> Hello, I found a blind spot of the query optimizer. This appears when >> a table is accessed as a view. I think the problem can be phrased as >>

[sqlite] Index not used in simple alias-like views

2010-05-24 Thread Edzard Pasma
Hello, I found a blind spot of the query optimizer. This appears when a table is accessed as a view. I think the problem can be phrased as "the optimizer failing to push an outer join predicate into a view"... This simply means that the following example does not use the existing index: cr

Re: [sqlite] Please help test the latest query planner changes

2010-04-18 Thread Edzard Pasma
Op 16-apr-2010, om 19:51 heeft D. Richard Hipp het volgende geschreven: > > On Apr 16, 2010, at 11:52 AM, Max Vlasov wrote: >> >> SELECT StihiAuthors.Id As AuthId, StihiAuthCandidates.Date as Date, >> StihiAuthCandidates.Num as Num FROM StihiAuthors >> INNER JOIN StihiAuthCandidates ON >> StihiA

Re: [sqlite] Reduce database file size

2010-04-12 Thread Edzard Pasma
If the subject is transferring data from a web server to a central database, I like to refer to a feature of an open source package that I published myself. It is only a side-side feature, resulting from the general design, but it was added with just this in mind. This feature, 'Connecting

Re: [sqlite] Passing Value from one query to another

2010-02-06 Thread Edzard Pasma
Op 6-feb-2010, om 18:03 heeft Eric Bohlman het volgende geschreven: > BareFeet wrote: >> In general, I think it's much better (performance and logic) to do >> all you can in SQL, without passing values out of SQL results, into >> your non-SQL code, then re-injecting back into another SQL query et

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-11 Thread Edzard Pasma
Op 11-jan-2010, om 1:15 heeft Nikolaus Rath het volgende geschreven > Edzard Pasma writes: >> Op 10-jan-2010, om 19:25 heeft Nikolaus Rath het volgende geschreven: >> >>> Filip Navara writes: >>>>> I am accessing the same database from several threa

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Edzard Pasma
tion attach at least 20 further databases within each of the 15 connections? Does it open at least 250 files any other way? If any yes, then you have too many open files! Regards, Edzard Pasma ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Rollback over pending queries

2009-10-22 Thread Edzard Pasma
--- edz...@volcanomail.com wrote: > I wonder if an automatic rollback, as described in > //www.sqlite.org/c3ref/busy_handler.html, is more powerful than a > rollback programmed in SQL. Particularly if it is able to rollback > pending queries from other cursors in the same connection. The > prog

[sqlite] Rollback over pending queries

2009-10-19 Thread Edzard Pasma
Hello, I wonder if an automatic rollback, as described in //www.sqlite.org/c3ref/busy_handler.html, is more powerful than a rollback programmed in SQL. Particularly if it is able to rollback pending queries from other cursors in the same connection. The programmed rollback fails here with BusyE

[sqlite] Rollback over pending queries

2009-10-19 Thread Edzard Pasma
Hello, I wonder if an automatic rollback, as described in //www.sqlite.org/c3ref/busy_handler.html, is more powerful than a rollback programmed in SQL. Particularly if it is able to rollback pending queries from other cursors in the same connection. The programmed rollback fails here with BusyE

Re: [sqlite] readers and writer

2009-10-14 Thread Edzard Pasma
to write to the database and/or reader if new > SHARED locks are denied while database is in a PENDING and/or > EXCLUSIVE lock state ( again, this point it not clear in documentation ). > Do I understand it correctly? > > -- > Dmitri Priimak Hello Dmitri, I understaod it the same way. However recently I observed that a PENDING lock does not perform its useful function (prevent writer starvation) in case readers and writers are threads of a single process! May that be the case? Best regards, Edzard Pasma. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] double calculation in SELECT

2009-10-05 Thread Edzard Pasma
On Mon, Oct 5, 2009 at 8:33 AM, Edzard Pasma wrote: > > > --- paiva...@gmail.com wrote: > > From: Pavel Ivanov > To: General Discussion of SQLite Database > Subject: Re: [sqlite] double calculation in SELECT > Date: Mon, 5 Oct 2009 07:13:28 -0400 > > First of all, do yo

Re: [sqlite] double calculation in SELECT

2009-10-05 Thread Edzard Pasma
--- paiva...@gmail.com wrote: From: Pavel Ivanov To: General Discussion of SQLite Database Subject: Re: [sqlite] double calculation in SELECT Date: Mon, 5 Oct 2009 07:13:28 -0400 First of all, do you really store several rows with the same id in the table1? If no then you don't need 'group by

Re: [sqlite] double calculation in SELECT

2009-10-04 Thread Edzard Pasma
--- proxi...@land.ru wrote: From: Michael To: sqlite-users@sqlite.org Subject: [sqlite] double calculation in SELECT Date: Sun, 04 Oct 2009 15:31:47 +0700 Hello, I have following SELECT statement in my program (Delphi+sqlite3):

Re: [sqlite] Busy Handler in Shared Cache Mode?

2009-08-11 Thread Edzard Pasma
good news is that Unlock Notification should handle it (http://www.sqlite.org/unlock_notify.html). --- edz...@volcanomail.com wrote: From: "Edzard Pasma" To: "General Discussion of SQLite Database" Cc: Subject: Re: [sqlite] Busy Handler in Shared Cache Mode? Date: Mon,

Re: [sqlite] Busy Handler in Shared Cache Mode?

2009-08-10 Thread Edzard Pasma
Hi Nikolaus, Interesting to read your findings. I assume you finally disallowed read_uncommitted. Trying to explain why the wait times can get longer, I come to two reasons. - the time slots where a read-lock is obtained become smaller. This can be significant if there are a lot of transaction

Re: [sqlite] Reasons for SQLITE_BUSY

2009-07-31 Thread Edzard Pasma
--- nikol...@rath.org wrote: > "Edzard Pasma" writes: >> --- nikol...@rath.org wrote: >>> "Igor Tandetnik" writes: >>>> Nikolaus Rath wrote: >>>>> I am accessing the same database from different threads. Each >>>&g

Re: [sqlite] Reasons for SQLITE_BUSY

2009-07-30 Thread Edzard Pasma
--- nikol...@rath.org wrote: > "Igor Tandetnik" writes: >> Nikolaus Rath wrote: >>> I am accessing the same database from different threads. Each thread >>> has its own connection. I have set the busy timeout for each >>> connection to 5000 milliseconds. >>> >>> However, in some testcases I still

Re: [sqlite] Multiple Writers and Database is Locked Problems

2009-07-20 Thread Edzard Pasma
. > Regards > /Cole > > > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Edzard Pasma > Sent: 19 July 2009 11:50 AM > To: kennethinbox-sql...@yahoo.com; General Discussion of SQLite Datab

Re: [sqlite] Multiple Writers and Database is Locked Problems

2009-07-19 Thread Edzard Pasma
I'd also make sure that all read-cursors are finished before starting a transaction. Or, take the exclusive lock already before the queries (possibly that is what was meant) --- kennethinbox-sql...@yahoo.com wrote: >From: Ken >To: General Discussion of SQLite Database >Subject: Re: [sqlite] M

[sqlite] Group_concat includes null if first in the group

2009-06-19 Thread Edzard Pasma
Hello, I found an issue in group_concat, that appears mainly cosmetical, however may be good to be aware of for those making a more creative use of this function. See the ticket http://www.sqlite.org/cvstrac/tktview?tn=3923. Edzard. ___ sqlite-users mai

Re: [sqlite] how can we solve IF EXIST in SQLite

2009-06-02 Thread Edzard Pasma
nserting the same products repeatedly in the stock table i jus > want the quantity as well as the dates to be updated . and wen i insert a > new product_batch_code to the purchase table its shuld be inserted in the > stock table also... > > Edzard Pasma wrote: >> >> Sorry, this

Re: [sqlite] how can we solve IF EXIST in SQLite

2009-06-02 Thread Edzard Pasma
Nuyt's idea which may be more comfortable if you like to keep the SQL simple.. Edzard --- edz...@volcanomail.com wrote: From: "Edzard Pasma" To: "General Discussion of SQLite Database" Cc: Subject: Re: [sqlite] how can we solve IF EXIST in SQLite Date: Tue, 2 Jun 2

Re: [sqlite] how can we solve IF EXIST in SQLite

2009-06-02 Thread Edzard Pasma
Hello, you are cleverer than you think. Your initial idea to use INSERT OR REPLACE might look like: INSERT OR REPLACE INTO stock_tab(stock_id, prod_batch_code, stock_qty, stock_date) SELECT s.stock_id, p.prod_batch_code, IF_NULL (s.stock_qty, 0) + p.purchase_qty DATETIME('NOW

[sqlite] Shared Cache unlock notification to multiple threads

2009-03-23 Thread Edzard Pasma
ny unlock-notify callback registered, also if for the same connection. But would not wish to complicate things. It is a somewhat crazy case and may as well be dealt with in the application that wishes to support it. Thanks for this most interesting development, Edzard Pasma

Re: [sqlite] having the Top N for each group

2009-02-15 Thread Edzard Pasma
d SQLite's incredible speed in doing UPDATE :) Edzard Pasma --- sylvain.point...@gmail.com wrote: From: Sylvain Pointeau To: edz...@volcanomail.com, General Discussion of SQLite Database Subject: Re: [sqlite] having the Top N for each group Date: Sun, 15 Feb 2009 21:44:58 +0100 Hello, on m

Re: [sqlite] having the Top N for each group

2009-02-15 Thread Edzard Pasma
sales.period = period.period order by sales.qty desc limit 3); -- Edzard Pasma --- sylvain.point...@gmail.com wrote: From: Sylvain Pointeau To: sqlite-users@sqlite.org Subject: [sqlite] having the Top N for each group Date: Sat, 14 Feb 2009 09:21:15 +0100 Hello all, I am wondering if we have

Re: [sqlite] having the Top N for each group

2009-02-14 Thread Edzard Pasma
only the top-N. I thought may be SUBSTR is a further solution. The use of LIMIT would be more elegant but I don't see how. is a TopN function planned for the future version of sqlite? ? Edzard Pasma --- sylvain.point...@gmail.com wrote: From: Sylvain Pointeau To: sqlite-users@sqlit

Re: [sqlite] selecting the top 3 in a group

2009-01-08 Thread Edzard Pasma
--- robert.ci...@gmail.com wrote: > I am still curious to know if there is a purely SQL way to do the same. This can be achieved using group_concat: select div, rtrim (substr (s, 1, 10)) nr1, rtrim (substr (s, 1, 10)) nr2, rtrim (substr (s, 1, 10)) nr3 from ( select div, group_co

Re: [sqlite] reporting number of changes

2008-12-11 Thread Edzard Pasma
--- [EMAIL PROTECTED] wrote: > Your approach only works in simple cases. The number of changes is a > connection/sqlite3* wide number - ie any SQLite statements associated with it > can cause changes. This would certainly be the case when multi-threading is > used. Yes, agreed > Even in si

Re: [sqlite] reporting number of changes

2008-12-10 Thread Edzard Pasma
is needed. Edzard Pasma --- [EMAIL PROTECTED] wrote: From: "Edzard Pasma" <[EMAIL PROTECTED]> To: Subject: [sqlite] reporting number of changes Date: Tue, 9 Dec 2008 01:36:39 -0800 Hello, The API function sqlite_changes reports the number of rows changed in the last update/inse

[sqlite] reporting number of changes

2008-12-09 Thread Edzard Pasma
t the value is not reset for other type of statements? Or is there an easy way to find if a statement was an update? Edzard Pasma ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Rounding is not so easy

2005-09-26 Thread Edzard Pasma
times before noticing any wait time at all. May this be something for a new built-in function? Thanks, Edzard Pasma _ Tired of spam and viruses? Get a VolcanoMail account with SpamShield Pro and Anti-Virus technology! http://www.volcanomail.com/

[sqlite] group by error in 3.2.6?

2005-09-20 Thread Edzard Pasma
or the rest I'm very happy with this version. Thanks, Edzard Pasma _ Tired of spam and viruses? Get a VolcanoMail account with SpamShield Pro and Anti-Virus technology! http://www.volcanomail.com/

[sqlite] Unlucky number for the ROUND function

2005-08-30 Thread Edzard Pasma
I found a number where the ROUND () function goes wrong: SQLite version 3.2.5 Enter ".help" for instructions sqlite> select round (9.95, 1); :.0 Sorry, it must be that I have bad luck today Edzard Pasma _ Tired of spa