Re: [sqlite] Unofficial poll

2012-09-24 Thread Petite Abeille
On Sep 23, 2012, at 12:37 PM, Baruch Burstein wrote: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread E. Timothy Uy
If you are trying to purge a huge database and it is not live, another possibility is to attach a new blank database and SELECT into it. This way you don't have to waste time with VACUUM. On Mon, Sep 24, 2012 at 10:04 AM, Clemens Ladisch wrote: > Don Goyette wrote: > > > With

Re: [sqlite] Unofficial poll

2012-09-24 Thread Yuriy Kaminskiy
Jay A. Kreibich wrote: > On Sun, Sep 23, 2012 at 09:25:06PM +0400, Yuriy Kaminskiy scratched on the > wall: >> Jim Dodgen wrote: > >>> I program mostly on Perl on Linux and it is a beautiful fit. Example >>> is I can have a date field with a POSIX time value (or offset) in it >>> or another

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread Clemens Ladisch
Don Goyette wrote: > > With 60*60*24 seconds per day, the number of days since the Unix epoch is: > > sqlite> select strftime('%s', '2012-05-22') / (60*60*24); > > 15482 > > The timestamp in the tables I'm reading is not in the format of > '2012-05-22'. Sorry, my explanations were not clear

Re: [sqlite] Virtual tables are driving me insane!

2012-09-24 Thread Jörgen Hägglund
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

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread Gerry Snyder
On 9/24/2012 9:25 AM, Don Goyette wrote: So, I still need to know how to convert the Excel format timestamp (Days since 1900-01-01) into a Unix Epoch format timestamp (Seconds since 1970-01-01). I agree with Bart's reply, but to convert epochs, subtract the Excel format timestamp of

[sqlite] :Re: DELETE Query Assistance Please

2012-09-24 Thread Black, Michael (IS)
You said you need to keep something like 30 days, right? Why convert at all? What's wrong with this: delete from mytable where mytime < max(mytime)-30 If you want to round it off to whole days: delete from mytable where mytime < round(max(mytime)-.5)-30 Or is there something else you need to

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread Bart Smissaert
Why you need to convert? What about the simple SQL I suggested? RBS On 9/24/12, Don Goyette wrote: > > Thank you for your reply and suggestions, Clemens. > > > With 60*60*24 seconds per day, the number of days since the Unix epoch > is: > sqlite> select

Re: [sqlite] DELETE Query Assistance Please

2012-09-24 Thread Don Goyette
Thank you for your reply and suggestions, Clemens. > With 60*60*24 seconds per day, the number of days since the Unix epoch is: sqlite> select strftime('%s', '2012-05-22') / (60*60*24); 15482 The timestamp in the tables I'm reading is not in the format of '2012-05-22'. It's in the

Re: [sqlite] Unofficial poll

2012-09-24 Thread Jay A. Kreibich
On Sun, Sep 23, 2012 at 09:25:06PM +0400, Yuriy Kaminskiy scratched on the wall: > Jim Dodgen wrote: > > I program mostly on Perl on Linux and it is a beautiful fit. Example > > is I can have a date field with a POSIX time value (or offset) in it > > or another date related value like "unknown"

Re: [sqlite] Store error messages in thread local memory

2012-09-24 Thread Olaf Schmidt
Am 24.09.2012 11:26, schrieb Sebastian Krysmanski: Ok, I tried that. It definitely improves performance when using a lot threads (15+)... So I take it, that your last posted result here was using a shared cache (in case of the multiple connections):

Re: [sqlite] Unofficial poll

2012-09-24 Thread Jay A. Kreibich
On Sun, Sep 23, 2012 at 01:37:59PM +0300, Baruch Burstein scratched on the wall: > I am curious about the usefulness of sqlite's "unique" type handling, and > so would like to know if anyone has ever actually found any practical use > for it/used it in some project? I am referring to the typeless

Re: [sqlite] Unofficial poll

2012-09-24 Thread monari.ad...@juno.com
My thoughts follow: Be lenient in what you accept; be stringent in what you produce. I believe SQLite follows this principle. Frank. Richard Hipp wrote: On Sun, Sep 23, 2012 at 6:37 AM, Baruch Burstein wrote: I am curious about the usefulness of sqlite's "unique"

Re: [sqlite] performance of one process using multiple independent sqlite databases

2012-09-24 Thread Bob Price
Yes, my tests have been on 8-real-core (+8 hyperthreaded) Windows Server 2008 R2 Datacenter, and on 6-real-core (+6 hyperthreaded) Fedora 14.  In general Linux performs better than Windows, but both exhibit the seeming serialization when multiple independent Sqlite databases are in use. 

Re: [sqlite] Store error messages in thread local memory

2012-09-24 Thread Sebastian Krysmanski
Ok - yet another test. This time, with WAL enabled. Results are much better: -- SELECT_COUNT: 1,000,000 THREAD_COUNT: 2 Testing with one connection (ReadWrite) and filled table... Elapsed: 15.8 s (126,316.8 stmt/sec) Testing with

Re: [sqlite] Store error messages in thread local memory

2012-09-24 Thread Sebastian Krysmanski
Ok, I tried that. It definitely improves performance when using a lot threads (15+) but decreases the performance considerably when using only two thread (from 60s down to 100s). -- SELECT_COUNT: 1,000,000 THREAD_COUNT: 2 Testing

Re: [sqlite] Unofficial poll

2012-09-24 Thread Eleytherios Stamatogiannakis
Sqlite's dynamic typing made it a natural fit for using it with Python UDFs in madIS: https://code.google.com/p/madis/ Absence of the feature would have complicated the whole "functional relational" [*] workflow that madIS uses a *lot*. l. [*] Instead of Python functions calling SQL, have

[sqlite] Documentation updates

2012-09-24 Thread Sebastian Krysmanski
Hi, I'm not sure whether this is the correct mailing list. Anyway, I found two improvement points in the SQLite documentation: 1. On http://www.sqlite.org/sharedcache.html section 5.0 is says: "Shared-cache mode is enabled on a per-process basis. Using the C interface, the following API can be

Re: [sqlite] Virtual tables are driving me insane!

2012-09-24 Thread OBones
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