Re: [sqlite] Problem invoking php functions from a trigger

2009-08-31 Thread Alejandro Ruiz-Oriol
Ok, you we're right!! The trigger fires a PHP function that connects back to de database and, in that connection I didn't register the php functions. Just in case someone runs in the same problem, this is a strange situation, because the function exists for PHP, but no for SQLite. So, the first

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-31 Thread Michael Schlenker
Dan Kennedy schrieb: On Aug 30, 2009, at 12:08 AM, carlos.tas...@farmerswife.com wrote: Hi Gerry, That's the first thing I tested. I downloaded this file: http://sqlite.org/tclsqlite-3.6.17.so.gz Does anyone else have the same problem? I'm using ActiveTcl 8.5.4. If your using ActiveTcl

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-31 Thread Carlos Tasada
Hi Michael, I didn't though about Teacup :) The ActiveState Teacup version works perfectly. Thanks a lot :) On Mon, 2009-08-31 at 11:26 +0200, Michael Schlenker wrote: Dan Kennedy schrieb: On Aug 30, 2009, at 12:08 AM, carlos.tas...@farmerswife.com wrote: Hi Gerry, That's the first

Re: [sqlite] Importing data into SQLite

2009-08-31 Thread Timothy A. Sawyer
You can use the sqlite binary to import data from a CSV file - if you do it that way you have to make sure that your data fields in the SQLite database match exactly in order the data in the CSV file. That's been my experience. The other way is to do it programmatically (Java, C++, etc). The

Re: [sqlite] Importing data into SQLite

2009-08-31 Thread P Kishor
On Mon, Aug 31, 2009 at 10:02 AM, Kavita Raghunathankavita.raghunat...@skyfiber.com wrote: Hi, I'm evaluating SQLite to be used as a small embedded database in a linux environment for Skyfiber Inc. What is the best way to import data into it ? .import I have a bunch of entities and

[sqlite] Big performance problem with inserting lots of data

2009-08-31 Thread Kalle Last
Hello, I'm having a big performance problem while trying to use sqlite as a data output for my application. The application writes out a bunch of packets relatively fast. There are about 10 different types of them with all but one sizing under 100 bytes. Those small ones I write out roughly once

[sqlite] Importing data into SQLite

2009-08-31 Thread Kavita Raghunathan
Hi, I'm evaluating SQLite to be used as a small embedded database in a linux environment for Skyfiber Inc. What is the best way to import data into it ? I have a bunch of entities and attributes in an excel spreadsheet. Could I import CSV ? What should be the columns (where can I read about

Re: [sqlite] load extension -- unload hook?

2009-08-31 Thread Jean-Christophe Deschamps
At 18:25 30/08/2009, you wrote: ´¯¯¯ When we load an extension it invokes sqlite3_extension_init(). Lets say, in addition to creating functions, the loaded extension library also does some internal data structure allocations, initializations etc here. Now, when the database is closed the

[sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-08-31 Thread Rod Dav4is
1. *OID vs ROWID*: Specification of the OID field name (in SELECT) did not set Rexx variables X.OID.n, but instead set variables x.ROWID.n 2. *Quotes in SELECT*: Specification of Field='3' failed to find hits; Field=3 (i.e. without quotes) was required. -- Regards, Rod

Re: [sqlite] Importing data into SQLite

2009-08-31 Thread Kavita Raghunathan
Thanks. One more question: Can multiple processes and threads (linux) use the db at the same time ? Kavita - Original Message - From: Timothy A. Sawyer tsaw...@mybowlingdiary.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Monday, August 31, 2009 7:11:32 AM

Re: [sqlite] Big performance problem with inserting lots of data

2009-08-31 Thread Kalle Last
2009/8/31 D. Richard Hipp d...@hwaci.com: On Aug 31, 2009, at 10:28 AM, Kalle Last wrote: Hello, I'm having a big performance problem while trying to use sqlite as a data output for my application. Before going further, have you seen http://www.sqlite.org/faq.html#q19 ? Weird, I tried

Re: [sqlite] Big performance problem with inserting lots of data

2009-08-31 Thread D. Richard Hipp
On Aug 31, 2009, at 11:07 AM, Kalle Last wrote: 2009/8/31 D. Richard Hipp d...@hwaci.com: On Aug 31, 2009, at 10:28 AM, Kalle Last wrote: Hello, I'm having a big performance problem while trying to use sqlite as a data output for my application. Before going further, have you seen

[sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Doug
I have two simple tables - one that defines a statistic, and one that hold the data for each statistic: CREATE TABLE Statistic ( StatID INTEGER PRIMARY KEY, OwningComputer TEXT NOT NULL ); CREATE TABLE StatData ( StatID INTEGER NOT NULL,

Re: [sqlite] Index performance using 2 integers vs. 1 float

2009-08-31 Thread danjenkins
Simon Slavin-2 wrote: We can't give you much idea because . . . Another aspect is which fields you need to retrieve when you do your SELECT. If your select needs to retrieve the time field, and the time field doesn't appear in the index it's using, it will need to read the time

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: I have two simple tables - one that defines a statistic, and one that hold the data for each statistic: CREATE TABLE Statistic ( StatID INTEGER PRIMARY KEY, OwningComputer TEXT NOT NULL ); CREATE TABLE StatData (

Re: [sqlite] Index performance using 2 integers vs. 1 float

2009-08-31 Thread danjenkins
Kosenko Max wrote: I think it's better to try go with single integer. It perfectly fits range 12:00:00 midnight, January 1, 0001 Anno Domini (Common Era) to 11:59:59 P.M., December 31, A.D. (C.E.) in 100 nanosecond units. And it's good idea to store all dates in UTC. Why do you

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Pavel Ivanov
Since there is an index on StatData.StatID, I would assume the GROUP BY would work by just hitting the index, but I've been wrong before. Maybe you were not so wrong as you think: sqlite explain query plan SELECT StatID FROM Statistic WHERE StatID NOT IN (SELECT StatID FROM ... StatData

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Jay A. Kreibich
On Mon, Aug 31, 2009 at 12:46:21PM -0500, Doug scratched on the wall: CREATE TABLE Statistic ( StatID INTEGER PRIMARY KEY, OwningComputer TEXT NOT NULL ); CREATE TABLE StatData ( StatID INTEGER NOT NULL, Value INTEGER NOT NULL,

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: I have two simple tables - one that defines a statistic, and one that hold the data for each statistic: CREATE TABLE Statistic ( StatID INTEGER PRIMARY KEY, OwningComputer TEXT NOT NULL ); CREATE TABLE StatData (

Re: [sqlite] Problem invoking php functions from a trigger

2009-08-31 Thread Kees Nuyt
On Mon, 31 Aug 2009 11:58:42 +0200, Alejandro Ruiz-Oriol aruiz...@itelsys.com wrote: I've been doing some further reading and I think that I already have the answer and it's No, no way to avoid this. As far as I've read, when you start any update function, SQLite makes an exclusive write lock to

Re: [sqlite] Big performance problem with inserting lots of data

2009-08-31 Thread Ken
Only problem is there seems to be 1-2s freeze on the moment I create a new file. If you are talking about creating a new database periodically with the same tables: try creating a template database and copy that to the new working version.

Re: [sqlite] load extension -- unload hook?

2009-08-31 Thread sub sk79
Firstly thanks to both of you for useful replies. Here is the new info I got from your replies: 1. sqlite_load_extension is per-db-connection - Oddly I did not see any explicit reference to this in either of the two places I looked for it: i)

[sqlite] how to get the records matching some two characters?

2009-08-31 Thread liubin liu
create table and index: CREATE TABLE data_rt ( id INTEGER, dataid CHAR(4), data CHAR(12), rec_time INTEGER, data_type CHAR(1) ); CREATE UNIQUE INDEX i_drt ON data_rt ( id, dataid ); there are data in the table of data_rt: sqlite SELECT * FROM data_rt; 6|1290|7e22473a|857000|22

Re: [sqlite] how to get the records matching some two characters?

2009-08-31 Thread Jay A. Kreibich
On Mon, Aug 31, 2009 at 06:33:08PM -0700, liubin liu scratched on the wall: create table and index: CREATE TABLE data_rt ( id INTEGER, dataid CHAR(4), data CHAR(12), rec_time INTEGER, data_type CHAR(1) ); CREATE UNIQUE INDEX i_drt ON data_rt ( id, dataid ); there are data in the table of

Re: [sqlite] how to get the records matching some two characters?

2009-08-31 Thread liubin liu
Thanks! This is what I need, :) Jay A. Kreibich-2 wrote: On Mon, Aug 31, 2009 at 06:33:08PM -0700, liubin liu scratched on the wall: create table and index: CREATE TABLE data_rt ( id INTEGER, dataid CHAR(4), data CHAR(12), rec_time INTEGER, data_type CHAR(1) ); CREATE UNIQUE INDEX

Re: [sqlite] Big performance problem with inserting lots of data

2009-08-31 Thread Terence Lorenzo
adding begin transaction before inserting data then commit transaction will surely boost the inserts Kalle Last wrote: Hello, I'm having a big performance problem while trying to use sqlite as a data output for my application. The application writes out a bunch of packets relatively

[sqlite] Search a Select in another Select

2009-08-31 Thread Terence Lorenzo
I have these 2 queries select K1.keyword from emaildata as E1 INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique INNER JOIN keywords as K1 on K1.id = L1.id_keyword WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' This query finds all matching keywords select