Re: [sqlite] General question on 'style' Simon/Stephen.

2013-06-19 Thread Rob Willett
Hi, I wasn't overaly bothered about performance, since my backend jobs take hours to run and processing TB's of data, the overhead of opening and closing a few hundred database connections in the grand scheme of things is pretty low. It was a general style and usage question. I'm a C hacker by

Re: [sqlite] General question on 'style' Simon/Stephen.

2013-06-19 Thread RSmith
Actually, having benched this specific thing before, I can tell you that there is a performance penalty opeining and closing DBs (as opposed to just keeping a connection open) - but this is not news, what might be news is that the performance penalty is much much smaller than I anticipated and in

Re: [sqlite] General question on 'style' Simon/Stephen.

2013-06-19 Thread Rob Willett
Stephen, Simon, I'm not worried about the CPU load at all, it was purely a question of style. Stephan has talked about keeping the connections open for the lifetime of a desktop connection, Simon has talked about closing and opening connections many, many times during the course of a transactio

Re: [sqlite] General question on 'style'

2013-06-19 Thread Simon Slavin
On 19 Jun 2013, at 3:15pm, Rob Willett wrote: > Now to the hub (excuse the really bad pun) of my questions, within my service > side application, I'm finding that I'm constantly opening and closing the > same SQLite database, inserting data, reading data, updating date over many > hours. The

Re: [sqlite] General question on 'style'

2013-06-19 Thread Stephen Chrzanowski
IMO, depends on the type of process wanting to make a connection. Anything web service wise is typically stateless, which means any time a new request is made, you have to re-open a new connection. You can probably get away with using server side variables to handle the connections, as I did in A

[sqlite] General question on 'style'

2013-06-19 Thread Rob Willett
Hi, My first question as a lurker and read of these groups. Hopefully it's not too stupid :) I've been working through using SQLite on my Mac and have a question on style and the way to use SQLite databases. My application has two parts, a client/PHP side to collect requests from a user and a

Re: [sqlite] General question on sqlite3_prepare, the bind and resets of prepared statements

2011-11-11 Thread Igor Tandetnik
On 11/11/2011 7:24 PM, Matt Young wrote: Embedded Sqlite3 questions: I want to load and prepare multiple statements, keep them prepared and when I want to use one of them, I will reset, bind and step. Make it bind, step and reset. Don't leave a statement active for a long time - it keeps the

Re: [sqlite] General question on sqlite3_prepare, the bind and resets of prepared statements

2011-11-11 Thread Jim Morris
Yes, works great! On 11/11/2011 4:24 PM, Matt Young wrote: Embedded Sqlite3 questions: I want to load and prepare multiple statements, keep them prepared and when I want to use one of them, I will reset, bind and step. Can pre-prepare multiple independent statements, then run them one at a ti

[sqlite] General question on sqlite3_prepare, the bind and resets of prepared statements

2011-11-11 Thread Matt Young
Embedded Sqlite3 questions: I want to load and prepare multiple statements, keep them prepared and when I want to use one of them, I will reset, bind and step. Can pre-prepare multiple independent statements, then run them one at a time at random? Thanks, this may be a newbie question for embede

Re: [sqlite] general question

2009-07-08 Thread John Stanton
For searching text files grep can be very handy. A regular expression is powerful. Jay A. Kreibich wrote: > On Wed, Jul 08, 2009 at 11:53:13AM +0100, Simon Slavin scratched on the wall: > >> On 8 Jul 2009, at 11:40am, _h_ wrote: >> >> >>> Does any mechanism is available via which I can b

Re: [sqlite] general question

2009-07-08 Thread Jay A. Kreibich
On Wed, Jul 08, 2009 at 07:19:02PM +0530, _h_ scratched on the wall: > Hi Jay, > Its nice to hear that you already did that. > > > If you're willing to write a bit of code, you can do whatever you want. > I can do that, can share some idea how it can be done. Read up on how build a virtual ta

Re: [sqlite] general question

2009-07-08 Thread _h_
Hi Jay, Its nice to hear that you already did that. > If you're willing to write a bit of code, you can do whatever you want. I can do that, can share some idea how it can be done. Thank you. On Wed, Jul 8, 2009 at 7:12 PM, Jay A. Kreibich wrote: > On Wed, Jul 08, 2009 at 11:53:13AM +0100, Si

Re: [sqlite] general question

2009-07-08 Thread Jay A. Kreibich
On Wed, Jul 08, 2009 at 11:53:13AM +0100, Simon Slavin scratched on the wall: > > On 8 Jul 2009, at 11:40am, _h_ wrote: > > > Does any mechanism is available via which I can bind the db with > > text file > > and can use the db apis to access that text file, and can perform > > the i/o. > >

Re: [sqlite] general question

2009-07-08 Thread Konrad J Hambrick
There are Free and Commercial ODBC Drivers for Text / CSV files out there. -- kjh On 07/08/2009 07:06 AM, P Kishor wrote: > On Wed, Jul 8, 2009 at 2:00 PM, _h_ wrote: >> Hi Kishor, >> Thank your pointing out perl db module. >> Is the same things are avaiable as C/C++ apis. > > I have no idea.

Re: [sqlite] general question

2009-07-08 Thread P Kishor
On Wed, Jul 8, 2009 at 2:00 PM, _h_ wrote: > Hi Kishor, > Thank your pointing out perl db module. > Is the same things are avaiable as C/C++ apis. I have no idea. Google is your friend. Although, if you are messing around with text files, Perl is probably way more suitable for the task than C. An

Re: [sqlite] general question

2009-07-08 Thread _h_
Hi Kishor, Thank your pointing out perl db module. Is the same things are avaiable as C/C++ apis. Thank you. On Wed, Jul 8, 2009 at 5:25 PM, P Kishor wrote: > On Wed, Jul 8, 2009 at 1:48 PM, _h_ wrote: > > I am looking for some thing where via db apis I inform the format of my > text > > file an

Re: [sqlite] general question

2009-07-08 Thread P Kishor
On Wed, Jul 8, 2009 at 1:48 PM, _h_ wrote: > I am looking for some thing where via db apis I inform the format of my text > file and then I can do open/close, read/write via db apis to interact with > the underlaying text file. > I require to access the text files, which has different formats, via

Re: [sqlite] general question

2009-07-08 Thread _h_
I am looking for some thing where via db apis I inform the format of my text file and then I can do open/close, read/write via db apis to interact with the underlaying text file. I require to access the text files, which has different formats, via unified apis. Thank you. On Wed, Jul 8, 2009 at 4

Re: [sqlite] general question

2009-07-08 Thread Simon Slavin
On 8 Jul 2009, at 11:40am, _h_ wrote: > Does any mechanism is available via which I can bind the db with > text file > and can use the db apis to access that text file, and can perform > the i/o. For SQLite to be useful for you, the data must be in a SQLite database file. You cannot manip

[sqlite] general question

2009-07-08 Thread _h_
Hi, Does any mechanism is available via which I can bind the db with text file and can use the db apis to access that text file, and can perform the i/o. Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailm