Re: [sqlite] SQLite not performing a certain update

2009-01-29 Thread Rickard Westerlund
On Mon, Jan 26, 2009 at 2:37 AM, John Machin wrote: > On 26/01/2009 12:17 PM, Rickard Westerlund wrote: >> On Sun, Jan 25, 2009 at 12:12 AM, John Machin wrote: >>> So SELECT has the same problem as UPDATE. That would suggest to me that >>> the next

Re: [sqlite] Do all db's in a connection need same level of lock?

2009-01-29 Thread Dan
My mistake, "PRAGMA lock_status" is only a valid command if you compile with -DSQLITE_DEBUG. And you're also right that your unused databases are being locked because you are using "BEGIN EXCLUSIVE". See here: d...@computer2:~/work/experimental/bld$ ./sqlite3 abc SQLite version 3.6.10

Re: [sqlite] help: need help in date conversion

2009-01-29 Thread P Kishor
On 1/29/09, venkat karri wrote: > Hi All, > > I have a database where date is stored in the integer format ( eg: > 1125426109) I want the output in mm/dd/ format. can any one tell me the > syntax to convert the date. http://www.sqlite.org/lang_datefunc.html You

Re: [sqlite] need help in date conversion

2009-01-29 Thread venkat karri
Thanks dude, that works ! On 1/29/09, Igor Tandetnik wrote: > > "venkat karri" > wrote in message > news:265032e50901291849h68ff004ay642ba7357a701...@mail.gmail.com > > I

Re: [sqlite] need help in date conversion

2009-01-29 Thread Igor Tandetnik
"venkat karri" wrote in message news:265032e50901291849h68ff004ay642ba7357a701...@mail.gmail.com > I have a database where date is stored in the integer format ( eg: > 1125426109) I want the output in mm/dd/ format. can any one tell > me the syntax to convert the date.

[sqlite] help: need help in date conversion

2009-01-29 Thread venkat karri
Hi All, I have a database where date is stored in the integer format ( eg: 1125426109) I want the output in mm/dd/ format. can any one tell me the syntax to convert the date. Regards, Venkata ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] shared cache and journal files

2009-01-29 Thread Dave Toll
It's funny how explaining an issue to a mailing list can make you spot the problem yourself... there was indeed a problem with my test code, database connections were not being opened for every thread as I expected them to be. I love SQLite - the bug is always in my code :) Cheers, Dave.

Re: [sqlite] shared cache and journal files

2009-01-29 Thread Dave Toll
A little more detail on this issue: It seems that my reading thread is not getting a shared lock on the database before accessing the journal file. In pagerSharedLock() the shared-cache Pager state is already PAGER_EXCLUSIVE because another thread is writing to a different table in the same

Re: [sqlite] FTS of sqlite.org

2009-01-29 Thread P Kishor
On 1/29/09, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > P Kishor wrote: > > Is it possible to implement a fulltext search of sqlite.org? I know I > > can use Google to search that site, but it would be nice to search the > > site itself

Re: [sqlite] FTS of sqlite.org

2009-01-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 P Kishor wrote: > Is it possible to implement a fulltext search of sqlite.org? I know I > can use Google to search that site, but it would be nice to search the > site itself using sqlite... If you go to http://www.sqlite.org/cvstrac/search then you

Re: [sqlite] Do all db's in a connection need same level of lock?

2009-01-29 Thread Chris Eich
I can't get it this (undocumented ) pragma to do anything for me: $ sqlite3 db/emu.db SQLite version 3.6.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> attach 'db/binned-eich.db' as binned; sqlite> begin exclusive; sqlite>

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
It might help if you explained what you're trying to do. Are you new to SQL and want a good tutorial? On Thu, Jan 29, 2009 at 11:28 AM, Vance E. Neff wrote: > Thanks Daniel, > > Not really, I'm guessing I'll have to find documentation on SQL in order > to find detailed

Re: [sqlite] Index keywords

2009-01-29 Thread Griggs, Donald
Hi Vance, Could you maybe give one or two examples on exactly what you need that you're not finding on the website? As far as syntax, it's pretty much all linked from: http://www.sqlite.org/lang.html E.g. for automatically incrementing primary key, see:

Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Thanks Daniel, Not really, I'm guessing I'll have to find documentation on SQL in order to find detailed information on field and index field descriptors or modifiers, such as INTEGER, PRIMARY, KEY, AUTOINCREMENT, etc. Any recommendations? Vance Daniel Watrous wrote: >oops, sorry, here's

Re: [sqlite] Sqlite2 vs Sqlite3 issues

2009-01-29 Thread Ty ...
What string are you using to connect to your database? // My sqlite 3 connection string $db = new PDO('sqlite:stats.sqlite'); // My sqlite 2 connection string $db = new PDO('sqlite2:test.sqlite'); Also, I had to uncomment an extension from php.ini (extension=php_pdo_sqlite.dll), but I don't

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
oops, sorry, here's the link: http://www.sqlite.org/lang.html On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous wrote: > Could this be what you're looking for? > > On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff wrote: >> I have seen that list of

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
Could this be what you're looking for? On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff wrote: > I have seen that list of keywords, but I'm looking for a description of > what they mean. In particular those associated with index definitions. > > Vance > > D. Richard Hipp

Re: [sqlite] PL/SQL in Sqlite?

2009-01-29 Thread Daniel Watrous
Thanks for the reply Thomas. This script runs on a machine that has a lot of work to send out to compute hosts. There are over 100 compute hosts and each has a number of processes requesting work. That means there may be as many as 30-40 hosts asking for work. To increase parallelization I

Re: [sqlite] PL/SQL in Sqlite?

2009-01-29 Thread Mike Borland
I am having similar concurrency issues and found that executing a "BEGIN IMMEDIATE" will only grab a reserved lock. This allows other threads to read the database and the writer won't grab the exclusive lock until it commits. This is helpful if the writer does a fair amount of work inside the

Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
I have seen that list of keywords, but I'm looking for a description of what they mean. In particular those associated with index definitions. Vance D. Richard Hipp wrote: >On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote: > > > >>Hi, >> >>I've searched and can not find where the keywords

Re: [sqlite] PL/SQL in Sqlite?

2009-01-29 Thread Thomas Briggs
If you really are only updating 20 records at a time you should be able to make it work plenty fast enough with plain old SQL. Something feels wrong about using an exclusive transaction here too. I can't say why, and I may well be wrong, but... just a gut hunch. On Thu, Jan 29, 2009 at

[sqlite] PL/SQL in Sqlite?

2009-01-29 Thread Daniel Watrous
Hello, I'm wondering if there is anything like PL/SQL that is built into SQLite? I have an application that requires me to use EXCLUSIVE transactions as follows: BEGIN EXCLUSIVE SELECT from table limit 20 for each UPDATE record assignment COMMIT The requests for assignments are coming in

Re: [sqlite] archiving memory databases

2009-01-29 Thread Rob Sciuk
> From: "DeTerra, David J" > Hi all, > > I was wondering if there is a feature in sqlite that would allow a set > of in-memory databases to periodically be written to disk for purposes > of database recovery on application or machine failure? > > And then

Re: [sqlite] Strange behavior with sum

2009-01-29 Thread D. Richard Hipp
On Jan 29, 2009, at 10:40 AM, matkinson wrote: > > Hi, > > I'm not replying with an answer, but with a similar problem. I am > using a > TRAC database on top of a SQLite DB and I want to provide a > percentage of > the sum total hours/sum estimated hours. Here's what I'm seeing. > - when

Re: [sqlite] Feasibility of SQLite as multiuser (readonly)

2009-01-29 Thread Simon
Short answer, yes. (But accessing the file through NFS might be problematic) Longer answer is in the FAQ, check out: http://www.sqlite.org/faq.html#q5 On Thu, Jan 29, 2009 at 9:42 AM, Ben Marchbanks wrote: > I realize the SQLite is designed for single client only but is it >

Re: [sqlite] Strange behavior with sum

2009-01-29 Thread matkinson
Hi, I'm not replying with an answer, but with a similar problem. I am using a TRAC database on top of a SQLite DB and I want to provide a percentage of the sum total hours/sum estimated hours. Here's what I'm seeing. - when only one value (a natural number) is summed and divided, the answer

[sqlite] FTS of sqlite.org

2009-01-29 Thread P Kishor
Richard, (or whoever manages sqlite.org), Is it possible to implement a fulltext search of sqlite.org? I know I can use Google to search that site, but it would be nice to search the site itself using sqlite... -- Puneet Kishor ___ sqlite-users

Re: [sqlite] Index keywords

2009-01-29 Thread D. Richard Hipp
On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote: > Hi, > > I've searched and can not find where the keywords like PRIMARY, > UNIQUE, > etc. in the Documentation. Please point me to the correct section. > Also, if I use autoincrement, how do I retrieve the new index value > for > use in

[sqlite] Feasibility of SQLite as multiuser (readonly)

2009-01-29 Thread Ben Marchbanks
I realize the SQLite is designed for single client only but is it feasible at all to use a SQLite DB for multiple users in a workgroup as a readonly data source ? -- *Ben Marchbanks* ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Hi, I've searched and can not find where the keywords like PRIMARY, UNIQUE, etc. in the Documentation. Please point me to the correct section. Also, if I use autoincrement, how do I retrieve the new index value for use in other tables? Again a doc. pointer would be good. Thanks! Vance

Re: [sqlite] playing with sqlite3

2009-01-29 Thread Thomas Briggs
When you say the load "stops", what do you mean? Does the sqlite3 process end? Does it sit there doing nothing? The first thing I would do is look at line 55035 of the source file and see if there's something weird about it. Also, have you done a line count on the file so you know

Re: [sqlite] archiving memory databases

2009-01-29 Thread Simon
I havent seen any such functions, but you can write your own code to copy data from one db (in-memory) to another (on disk). Copy pasting example from another thread: attach second.db as second insert into main.table (select * from second.table) detach second -- You could also implement

[sqlite] playing with sqlite3

2009-01-29 Thread Mike Eggleston
Hi, I'm curious how sqlite3 may perform for some of my applications that really don't need things like MySQL or larger. I am using bacula (http://www.bacula.org) at work so I dumped the bacula data from MySQL (mysqldump bacula > bacula.sql), wrote a perl script to massage the data, and now I'm

[sqlite] archiving memory databases

2009-01-29 Thread DeTerra, David J
Hi all, I was wondering if there is a feature in sqlite that would allow a set of in-memory databases to periodically be written to disk for purposes of database recovery on application or machine failure? And then subsequently read those persisted database files back into a memory database on

Re: [sqlite] Do all db's in a connection need same level of lock?

2009-01-29 Thread Dan
On Jan 29, 2009, at 3:13 AM, Chris Eich wrote: > I have read http://sqlite.org/atomiccommit.html which seems to imply > that > all db files in a transaction are locked at the same level as the > transaction progresses (i.e. all Reserved, then all Exclusive, ...). > This > makes sense when