Re: [sqlite] XML and SQLite?

2005-01-22 Thread David Wheeler
On Jan 22, 2005, at 11:13 PM, Jeff wrote: Here is the question: Should I store XML files in a database, or should I just put it on the file system. Which would be faster? The file system would be faster, since SQLite sits on top of it, anyway, so you have its overhead no matter what. Regards,

[sqlite] XML and SQLite?

2005-01-22 Thread Jeff
I'm making something that requires XML. (ooh, secretness) It would also be nice to use SQLite with it, but I am confused about how much things I need to put into the database and how much that needs to stay on the file system. You probably didn't understand that. My describing skills suck. Here

Re: [sqlite] UPDATE query: why is that code sooo slow?

2005-01-22 Thread D. Richard Hipp
On Sat, 2005-01-22 at 11:50 -0500, Luc Vandal wrote: > Perhaps Iâm not doing things correctly, but this code will take about 1 > minute to execute (2400 records on a total of around 44000 records): > > for(INT nCurrRow=1;nCurrRow<=nRows;nCurrRow++) >

Re: [sqlite] UPDATE query: why is that code sooo slow?

2005-01-22 Thread Clay Dowling
Gwendolynn ferch Elydyr wrote: I seem to recall that there was a significant performance difference between using sqlite3_exec vs prepared statements. You might try using sqlite3_prepare/bind/finalize. I would add that you need to do all of your database retreiving before starting the updating.

Re: AW: [sqlite] sqlite3_column_tablename

2005-01-22 Thread Dan Kennedy
--- "Plenert, Joerg" <[EMAIL PROTECTED]> wrote: > Yes that function points into the right direction ! > But I need something like that: > > SELECT t0.x as col0, t1.x as col1 from table0 as t0, table1 as t1 where t0.y > = t1.y; > > Now I want the following information about the colums: > >

RE: [sqlite] UPDATE query: why is that code sooo slow?

2005-01-22 Thread Gwendolynn ferch Elydyr
On Sat, 22 Jan 2005, Luc Vandal wrote: Wrap he updates in a transaction. I'm already doing that (unless I'm doing it wrong?): nRet = sqlite3_exec( m_pDB, _T("BEGIN;"), 0, 0, ); ... nRet = sqlite3_exec( m_pDB, _T("COMMIT;"), 0, 0, ); I seem to recall that there was a significant performance

Re: [sqlite] How to .import NULL values?

2005-01-22 Thread Jollino
Il giorno 22 gen 2005, alle 18:53, Ulrik Petersen ha scritto: I forgot to say this about my "contribution": Of course! :) Thanks *a lot* for the patch, I will test it tomorrow. Daniele -- Daniele Nicolucci (Jollino) Photo portfolio: http://www.nicolucci.net Sarà anche vero che vivere sulla Terra

Re: [sqlite] How to .import NULL values?

2005-01-22 Thread Ulrik Petersen
Hi Daniele, Ulrik Petersen wrote: Only in sqlite-3.0.8-nullimport/: config.h Only in sqlite-3.0.8-nullimport/: config.log Only in sqlite-3.0.8-nullimport/: config.status Only in sqlite-3.0.8: doc Only in sqlite-3.0.8-nullimport/: libtool Only in sqlite-3.0.8-nullimport/: Makefile Only in

Re: [sqlite] How to .import NULL values?

2005-01-22 Thread Ulrik Petersen
Hi Daniele, Daniele Nicolucci (Jollino) wrote: Il giorno 22 gen 2005, alle 18:16, Ulrik Petersen ha scritto: As you can see, sqlite3_bind_text is used for all columns. You would have to write some ad-hoc code inside the loop that checked whether the value in azCol[i] was "null" or "NULL", and

Re: [sqlite] How to .import NULL values?

2005-01-22 Thread Jollino
Il giorno 22 gen 2005, alle 18:16, Ulrik Petersen ha scritto: As you can see, sqlite3_bind_text is used for all columns. You would have to write some ad-hoc code inside the loop that checked whether the value in azCol[i] was "null" or "NULL", and then used sqlite3_bind_null if that was the

Re: [sqlite] How to .import NULL values?

2005-01-22 Thread Ulrik Petersen
Hi Daniele, Daniele Nicolucci (Jollino) wrote: Hello, I'm using sqlite 3.0.7 on OS X and I'm having a hard time using the .import function to import data which includes NULL values. I made a test database to describe the problem. This is the schema of the table: sqlite> .schema CREATE TABLE

Re: [sqlite] UPDATE query: why is that code sooo slow?

2005-01-22 Thread Scott Wilkinson
Luc Vandal wrote: Hi, Perhaps I’m not doing things correctly, but this code will take about 1 minute to execute (2400 records on a total of around 44000 records): Wrap he updates in a transaction. See http://www.sqlite.org/lang_transaction.html for the syntax. -- Scott Wilkinson MICROS

[sqlite] UPDATE query: why is that code sooo slow?

2005-01-22 Thread Luc Vandal
Hi, Perhaps I’m not doing things correctly, but this code will take about 1 minute to execute (2400 records on a total of around 44000 records): Basically, I’m getting records that need to be updated. Then, I go through each record and update it. Should be fast IMHO but I don’t see why it’s

[sqlite] How to .import NULL values?

2005-01-22 Thread Jollino
Hello, I'm using sqlite 3.0.7 on OS X and I'm having a hard time using the .import function to import data which includes NULL values. I made a test database to describe the problem. This is the schema of the table: sqlite> .schema CREATE TABLE quest (id integer primary key default null, sesso,

AW: [sqlite] sqlite3_column_tablename

2005-01-22 Thread Plenert, Joerg
Yes that function points into the right direction ! But I need something like that: SELECT t0.x as col0, t1.x as col1 from table0 as t0, table1 as t1 where t0.y = t1.y; Now I want the following information about the colums: 1: column name = col0 original column name = x table name =

Re: [sqlite] Version 3.1.0

2005-01-22 Thread Robert L Cochran
Yes -- this is what I'm talking about. Bob Roger Binns wrote: I think all this discussion has missed the original question. Quite simply, is there any way in which the SQLite *source code* could be changed in order to get better performance on 64 bit machines. If there is then following

Re: [sqlite] Version 3.1.0

2005-01-22 Thread Clay Dowling
Robert L Cochran wrote: 1. My wife, on her 32 bit Intel laptop, running Microsoft Access, finds her system slowed down to a crawl whenever she works with one table that has 109,000 rows. This is just the beginning of the huge tables she creates. She has a bunch of others. I moved this table to

Re: AW: [sqlite] sqlite3_column_tablename

2005-01-22 Thread Ulrik Petersen
Hi Joerg, Plenert, Joerg wrote: Hi Ulrik, picture this: A user types a query with output of fields from two ore more tables. Now, before you output the data, you'll check if the user has the right to see the data in the fields. So I check if the columns name is in my "allowed" list. Because two

AW: [sqlite] sqlite3_column_tablename

2005-01-22 Thread Plenert, Joerg
Hi Ulrik, picture this: A user types a query with output of fields from two ore more tables. Now, before you output the data, you'll check if the user has the right to see the data in the fields. So I check if the columns name is in my "allowed" list. Because two tables may have a column with

Re: [sqlite] sqlite3_column_tablename

2005-01-22 Thread Ulrik Petersen
Hi Joerg, Plenert, Joerg wrote: Hi ! I need a possibility to get the table name (actual and/or original) from a column. There is a function sqlite3_column_name that returns the name of the column. How about a function sqlite3_column_tablename that returns the tablename ? I need that function to

[sqlite] sqlite3_column_tablename

2005-01-22 Thread Plenert, Joerg
Hi ! I need a possibility to get the table name (actual and/or original) from a column. There is a function sqlite3_column_name that returns the name of the column. How about a function sqlite3_column_tablename that returns the tablename ? I need that function to check user rights on the data