[sqlite] Problems building for VxWorks...

2008-08-20 Thread Kershaw, Anthony (UK)
Hi, Have been trying to compile (and run) the amalgamated version of sqlite 3.6.1 for VxWorks 5.5, which is proving quite trouble-some. I am currently using these switches -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_TEMP_STORE=3

Re: [sqlite] Multiple connection to in-memory database

2008-08-20 Thread Brandon, Nicholas (UK)
> > I would like to use transactions from separate threads, each > thread having one connection to a single in-memory db. > If your production environment is a modern linux distribution you may find the temporary directory ("/tmp") is already a memory drive using the tmpfs filesystem. If not

Re: [sqlite] Help with Sqlite

2008-08-20 Thread Brandon, Nicholas (UK)
> I'm using the install of Firefox that comes with the Wubi > install of Linux. I like sqlite, but have a little problem. > Perhaps someone can help. > > When I add a new record to a database, an entry screen comes > up with my fields and the ability to enter the new record. > But the

[sqlite] sqlite 3 and php

2008-08-20 Thread Amy Gibbs
I'm trying to use php to maniupltate an sqlite database using the following code, but it doesn't seem to be running the update query. I'm not getting any error, but the datbase values are not changing. Can anyone help? query($query); $result=$statement->fetchAll(); $statement=null; foreach

Re: [sqlite] Correct SQL name resolution on AS clauses in a SELECT?

2008-08-20 Thread Brad Stiles
D. Richard Hipp <[EMAIL PROTECTED]> wrote: > CREATE TABLE t1(a INTEGER, b INTEGER); > INSERT INTO t1 VALUES(1,2); > INSERT INTO t1 VALUES(9,8); MSSQL Server 2000 > SELECT a AS b, b AS a FROM t1 ORDER BY a; b a --- --- 1 2 9 8 >

Re: [sqlite] Help with Sqlite

2008-08-20 Thread Jeffrey Needle
Thanks to all for the guidance. Yes, I'm using it as a FF extension. I'll have to look further in the proper forms. Thanks again. On Wed, 2008-08-20 at 11:20 +0530, Graeme wrote: > As the previous rely said, this is not a sqlite problem. I am not sure what > it > is because Firefox by itself

Re: [sqlite] Help with Sqlite

2008-08-20 Thread Jeffrey Needle
On Wed, 2008-08-20 at 09:36 +0100, Brandon, Nicholas (UK) wrote: > > I'm using the install of Firefox that comes with the Wubi > > install of Linux. I like sqlite, but have a little problem. > > Perhaps someone can help. > > > > When I add a new record to a database, an entry screen comes >

Re: [sqlite] 2 Questions from a newbie

2008-08-20 Thread cstrader
Well it turns out that the db created this way (including the index) is no smaller than the one with 2400 tables, and the read is no faster! Does that make any sense? Thanks - Original Message - From: "Jeff Hamilton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "General Discussion

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Dennis Cote
Mrinal Kant wrote: >> Try: >> PRAGMA [database.]table_info(table-name); > >> ( Kees Nuyt > > Thankyou Kees for the solution > But, I am facing another problem which is as follows: I open an sqlite > db and create a table "trial". pragma main.table_info(trial) shows > correct info. Then I

Re: [sqlite] 2 Questions from a newbie

2008-08-20 Thread Ken
yes, but you now have only 1 table to deal with. The DB has to store roughly the same amount of data. But at least now when you need to add a column you only need to do so on 1 table. And it reduces the amount of parsing ie not 2400 different select but only 1. And you won't need to write

Re: [sqlite] 2 Questions from a newbie

2008-08-20 Thread Keith Goodman
On Wed, Aug 20, 2008 at 6:03 AM, cstrader <[EMAIL PROTECTED]> wrote: > Well it turns out that the db created this way (including the index) is no > smaller than the one with 2400 tables, and the read is no faster! Does that > make any sense? Do you often pull your data one stock at a time? If so

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
SQLite Analyser results, I only included the eight largest tables the others are all tiny: /** Disk-Space Utilization Report For test.db *** As of 2008-Aug-19 16:10:41 Page size in bytes 1024 Pages in the whole file (measured) 9176 Pages in the whole file

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 19, 2008, at 6:24 PM, Brown, Daniel wrote: > SQLite is very memory > intensive compared to our current solution (although SQLite is faster > and more feature rich), e.g. 9MB for our current solution versus 28 MB > for SQLite with the same source data. Where did you get the 28MB figure?

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
Looking in process explorer on XP after the disc database detached should a memory size change of 28 MB of RAM in the test application, I assumed this was the size of the database in memory. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of D. Richard Hipp

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 20, 2008, at 1:53 PM, Brown, Daniel wrote: > Looking in process explorer on XP after the disc database detached > should a memory size change of 28 MB of RAM in the test application, I > assumed this was the size of the database in memory. That would be the peak memory usage by the

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
sqlite3_memory_highwater() ~ 25673060 sqlite3_memory_used() ~ 23222709 I'm doing the following in C++ (I test all return codes but removed the tests to save bandwidth): const char* ptail = NULL; sqlite3_stmt* pstatement = NULL; int result = -1; int

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Jeffrey Becker
More over, the memory usage reported by process explorer is subject to the vagrancies of the windows memory allocator. Generally the memory usage you see reported in tools is quite a bit higher than the actual memory usage of your application. First off windows manages memory in fixed size

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 20, 2008, at 2:22 PM, Brown, Daniel wrote: > sqlite3_memory_highwater() ~ 25673060 > sqlite3_memory_used() ~ 23222709 > OK. I'll have a look D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
Thank you, I imported our data from the source Excel file (.xls) using the third party SQLite Analyzer application (http://www.kraslabs.com/sqlite_analyzer.php) if that makes any difference? The size of the SQLite database on disc is 9,396,224 bytes so I was surprised when the memory usage

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 20, 2008, at 2:56 PM, Brown, Daniel wrote: > Thank you, I imported our data from the source Excel file (.xls) using > the third party SQLite Analyzer application > (http://www.kraslabs.com/sqlite_analyzer.php) if that makes any > difference? > > The size of the SQLite database on disc is

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Kees Nuyt
On Wed, 20 Aug 2008 06:33:17 +0530, Mrinal wrote: >>Try: >>PRAGMA [database.]table_info(table-name); > >> ( Kees Nuyt > >Thankyou Kees for the solution yw. >But, I am facing another problem [...] As Dennis said, that looks like a bug. I just confirmed SQLite 3.6.0 behaves the same way.

Re: [sqlite] Problems building for VxWorks...

2008-08-20 Thread Alex Katebi
Write the missing functions with using the equivalent VxWorks functions. example: int exit(int a) { vxworks_exit(a); } On Wed, Aug 20, 2008 at 4:16 AM, Kershaw, Anthony (UK) < [EMAIL PROTECTED]> wrote: > > Hi, > Have been trying to compile (and run) the amalgamated version of sqlite >

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Mrinal Kant
>As Dennis said, that looks like a bug. Created a new ticket (number 3320: http://www.sqlite.org/cvstrac/tktview?tn=3320) which has been fixed now. - Mrinal. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
That is interesting, all that I've done to the source code locally is added some C++ casts to get rid of compiler warnings, the C++ source I posted earlier is the complete test I'm using, it is running on Windows XP and its SQLite 3.5.1 from the pre-processed source code downloaded from the site.

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
I just upgraded to the latest version (3.6.1) of the pre-processed C source code from the website, running the test again gives me similar results of 22.2 MB used and 24.55 MB high water from the same 9 MB file. Is there any way it could be the file that is causing the extra memory usage? I'll

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Kees Nuyt
On Thu, 21 Aug 2008 02:18:39 +0530, Mrinal wrote: >>As Dennis said, that looks like a bug. > > Created a new ticket (number 3320: > http://www.sqlite.org/cvstrac/tktview?tn=3320) > which has been fixed now. Wow, that's fast. >- Mrinal. -- ( Kees Nuyt ) c[_]

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread D. Richard Hipp
On Aug 20, 2008, at 5:30 PM, Brown, Daniel wrote: > I just upgraded to the latest version (3.6.1) of the pre-processed C > source code from the website, running the test again gives me similar > results of 22.2 MB used and 24.55 MB high water from the same 9 MB > file. > Is there any way it

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
Perhaps, when is the next release due? I'd be interested to see the differences, if an upgrade reduces memory overhead that significantly it would be most excellent :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of D. Richard Hipp Sent: Wednesday,

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Dennis Cote
Brown, Daniel wrote: > I just upgraded to the latest version (3.6.1) of the pre-processed C > source code from the website, running the test again gives me similar > results of 22.2 MB used and 24.55 MB high water from the same 9 MB file. > Is there any way it could be the file that is causing the

Re: [sqlite] Reducing SQLite Memory footprint(!)

2008-08-20 Thread Brown, Daniel
Thanks Dennis, I just tried with rebuilt data from SQLite Analyzer in SQLite 3.6.1, I'm still seeing a memory usage that is roughly three times the size of the source database file, looking at your changes to my test there doesn't seem to be any fixes that would resolve that. I can see the

[sqlite] sqlite3_trace

2008-08-20 Thread Alex Katebi
Hi All, I am using the sqlite3_trace to track down a bug. It is lacking a vital information that is needed for tracing. The stmt handle is necessary in order to identify related statements. Notice the sqlite3_stmt that I have added below. void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const

Re: [sqlite] sqlite3_trace

2008-08-20 Thread Alex Katebi
Boy I was off on that one. The stmt is not going to help my case. The users context that is already there can help me. Sorry, -Alex On Wed, Aug 20, 2008 at 8:52 PM, Alex Katebi <[EMAIL PROTECTED]> wrote: > Hi All, > > I am using the sqlite3_trace to track down a bug. It is lacking a vital >