Re: [sqlite] create index before or after many inserts?

2010-06-15 Thread Jay A. Kreibich
On Tue, Jun 15, 2010 at 08:58:22PM -0700, Roger Binns scratched on the wall: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/15/2010 07:59 PM, Simon Slavin wrote: > > The standard assumption about SQLite is that it's faster to do your INSERTs > > first, then create the indices. > >

Re: [sqlite] create index before or after many inserts?

2010-06-15 Thread Eric Smith
Simon Slavin wrote: > The standard assumption about SQLite is that it's faster to do your > INSERTs first, then create the indices. How much of a difference this > makes depends on a lot of things. On what things does it depend? -- Eric A. Smith Sendmail may be safely run set-user-id to

Re: [sqlite] create index before or after many inserts?

2010-06-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2010 07:59 PM, Simon Slavin wrote: > The standard assumption about SQLite is that it's faster to do your INSERTs > first, then create the indices. If the index is created first then the data in the table and the pages making up the index

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2010 08:02 PM, Igor Tandetnik wrote: > That's just polling, really. SQLite's busy handler tries to access the > database, sleeps a little, tries again, sleeps again, and so on. It's not > "woken up" the way, say, a thread waiting on a mutex

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Jay A. Kreibich
On Tue, Jun 15, 2010 at 09:47:23PM -0500, Jay A. Kreibich scratched on the wall: > On Tue, Jun 15, 2010 at 09:48:53PM -0400, Igor Tandetnik scratched on the > wall: > > Rich Rattanni wrote: > > > The creator of SQLite actually gave a talk about using an SQLite > > > database

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Igor Tandetnik
Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 06/15/2010 06:48 PM, Igor Tandetnik wrote: >> Well, what trick? There is no way I know of for another process to get >> notified of changes to the database. That is, other than >> polling, or a

Re: [sqlite] create index before or after many inserts?

2010-06-15 Thread Simon Slavin
On 16 Jun 2010, at 3:55am, Eric Smith wrote: > Let's say my app has (only) inserts followed by (only) reads. > > The reads are best served by some indices. So I can create the indices > before the INSERTs, or after them. > > In general, should I expect a run time perf difference between

[sqlite] create index before or after many inserts?

2010-06-15 Thread Eric Smith
Let's say my app has (only) inserts followed by (only) reads. The reads are best served by some indices. So I can create the indices before the INSERTs, or after them. In general, should I expect a run time perf difference between these two options? Eric -- Eric A. Smith Louis

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Jay A. Kreibich
On Tue, Jun 15, 2010 at 09:48:53PM -0400, Igor Tandetnik scratched on the wall: > Rich Rattanni wrote: > > The creator of SQLite actually gave a talk about using an SQLite > > database as a means for IPC (it was available on youtube, maybe you > > can find it). If you want an

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2010 06:48 PM, Igor Tandetnik wrote: > Well, what trick? There is no way I know of for another process to get > notified of changes to the database. That is, other than polling, or a side > channel independent of SQLite. One way I have

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Igor Tandetnik
Rich Rattanni wrote: > The creator of SQLite actually gave a talk about using an SQLite > database as a means for IPC (it was available on youtube, maybe you > can find it). If you want an 'sqlit-ish' way, why not use that trick? Well, what trick? There is no way I know of

Re: [sqlite] How do you switch to daily digest mode for the sqlliteemail

2010-06-15 Thread Igor Tandetnik
Lake Lake wrote: > I tried doing what the page says, but it acted like i was trying to > reregister. Click "Unsubscribe or edit options" button at the very bottom. -- Igor Tandetnik ___ sqlite-users mailing list

[sqlite] How do you switch to daily digest mode for the sqllite email

2010-06-15 Thread Lake Lake
I tried doing what the page says, but it acted like i was trying to reregister. Sry noob question Mark ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Rich Rattanni
The creator of SQLite actually gave a talk about using an SQLite database as a means for IPC (it was available on youtube, maybe you can find it). If you want an 'sqlit-ish' way, why not use that trick? One advantage of using SQLite is that debugging / backtracing becomes easier. Since your

Re: [sqlite] is there any way for create a sqlite blob field with python?

2010-06-15 Thread Simon Slavin
On 15 Jun 2010, at 10:26pm, Roger Binns wrote: > On 06/15/2010 02:16 PM, Simon Slavin wrote: >> An image file is just a file. If you really want to store a file in a >> database, open the file, read the contents, and store what you read in a >> BLOB field. > > That is the general correct

Re: [sqlite] is there any way for create a sqlite blob field with python?

2010-06-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2010 02:16 PM, Simon Slavin wrote: > An image file is just a file. If you really want to store a file in a > database, open the file, read the contents, and store what you read in a BLOB > field. That is the general correct answer but not

Re: [sqlite] is there any way for create a sqlite blob field with python?

2010-06-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/2010 01:46 PM, Fabio Spadaro wrote: > I am developing an interface to Python 's SQLite and would it be > you can store files in the sqlite database. To do this > obviously need to create a blob field but how to store image files? If you are

Re: [sqlite] is there any way for create a sqlite blob field with python?

2010-06-15 Thread Simon Slavin
On 15 Jun 2010, at 9:46pm, Fabio Spadaro wrote: > I am developing an interface to Python 's SQLite and would it be > you can store files in the sqlite database. To do this > obviously need to create a blob field but how to store image files? An image file is just a file. If you really want to

Re: [sqlite] notify all processes of database modification

2010-06-15 Thread Igor Tandetnik
arno wrote: > I have two processes connecting to a database. Both can modify database. When > some process modify database, I want the other to be notified (so, it can > reload data). > Currently, I use unix sockets, so a process can notify all listener process > that something

[sqlite] notify all processes of database modification

2010-06-15 Thread arno
Hi, I have two processes connecting to a database. Both can modify database. When some process modify database, I want the other to be notified (so, it can reload data). Currently, I use unix sockets, so a process can notify all listener process that something has changed. But I wonder if there's

[sqlite] is there any way for create a sqlite blob field with python?

2010-06-15 Thread Fabio Spadaro
Hi all. I am developing an interface to Python 's SQLite and would it be you can store files in the sqlite database. To do this obviously need to create a blob field but how to store image files? -- Fabio Spadaro www.fabiospadaro.com ___ sqlite-users

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-15 Thread sub sk79
Hi Shawn, > demonstrate SQLite best > practices, including how to correctly handle error conditions, such as > the database is locked condition? > If you pre-select and then modify, you have to be aware enough to > realize you MUST wrap the whole process in a manual transaction, > and you

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-15 Thread Jay A. Kreibich
On Tue, Jun 15, 2010 at 04:36:15PM +0100, Simon Slavin scratched on the wall: > > On 15 Jun 2010, at 4:23pm, Robert Latest wrote: > > > Instinctively I'd rather first SELECT, store the > > results, finalize the SELECT statement and then get to work on its > > result using the stored data. It's

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-15 Thread Simon Slavin
On 15 Jun 2010, at 4:23pm, Robert Latest wrote: > Instinctively I'd rather first SELECT, store the > results, finalize the SELECT statement and then get to work on its > result using the stored data. It's just that without intermediate > storage it's a bit easier (no need to do any ressource

Re: [sqlite] INSERT is not committing from c#

2010-06-15 Thread Simon Slavin
On 15 Jun 2010, at 3:07pm, nmartin wrote: > I have a C# from which I am trying to perform a COMMIT. The INSERT does not > throw an error but no data is inserted. What makes you think that no data is inserted ? If you quit your program after those instructions and examine the database with the

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-15 Thread Robert Latest
Hello all, > Oh, I completely forgot that people can do that. So, Robert, you case > is exactly the case I was talking about. As Simon said your SELECT > opens read-only transaction and then as you issue your first UPDATE > this transaction have to be converted to writing one. This is a call >

[sqlite] INSERT is not committing from c#

2010-06-15 Thread nmartin
I have a C# from which I am trying to perform a COMMIT. The INSERT does not throw an error but no data is inserted. I have tried a couple ways of COMMITTING: try { SQLiteTransaction liteTransaction = Connection.BeginTransaction(); SQLiteCommand command = new

[sqlite] Yet another SQLite wrapper for Java

2010-06-15 Thread Igor Sereda
Hello. I have just posted our Java wrapper for SQLite as an open-source project: http://code.google.com/p/sqlite4java It's a thin JNI-based wrapper (no JDBC) with performance and stability being the key concerns. The library is targeted for desktop Java apps, but may be used in other Java

Re: [sqlite] SQLite and Qt

2010-06-15 Thread Sylvain Pointeau
Hi, What is the error? did you make a sample project that you could share? Best regards, Sylvain On Tue, Jun 15, 2010 at 1:11 AM, Sam Carleton wrote: > Sylvain, > > I have given it a try and it isn't working. First a quick questions: > Is qsqlite.dll statically