Re: [sqlite] Backing up a SQlite database

2007-02-09 Thread Christian Smith
Rich Shepard uttered: On Fri, 9 Feb 2007, Mikey C wrote: This might be a dumb question, but is taking a backup of a live database simply a matter of copying the file to a backup device/drive? Yes. It's a regular file to your OS. As a matter of fact, you can copy the file to another name and

Re: [sqlite] SQLite db lock problem

2007-02-20 Thread Christian Smith
Allan, Mark uttered: Hi, A little while back I submitted a query as to whether SQLite would be a good alternative to using MS Access as an internal database for a PC application. I received many repiles for which I was grateful. Mostly people thought that SQLite was a far more superior optio

Re: [sqlite] Question about speed of CASE WHEN

2007-03-18 Thread Christian Smith
RB Smissaert uttered: Looking at the fastest way to convert a field in a table and wonder if in general an update with a CASE WHEN construction or an update with a join to a lookup table is faster. My guess is that the CASE WHEN form will be faster for small number of possibilities. It compi

Re: [sqlite] Strange performance behavior

2007-03-19 Thread Christian Smith
Hubertus uttered: Dear list, sorry to just come up with another performance question. I build a yet small database with one table. It has about 650.000 rows, 75 columns and has at the moment about 650 Mb. It runs on a Intel Pentium M with 2 GHz. The Laptop runs Suse 10.2 and does basicly nothing

Re: [sqlite] Auto Vaccum and fragmentation?

2007-04-16 Thread Christian Smith
Ludvig Strigeus uttered: Assuming I have an autovacuum database that primarily stores 32k blobs. If I add/remove lots of rows, will this lead to excessive fragmentation of the overflow chains, or does Sqlite do anything to try to unfragment the pages belonging to a single row? I believe auto-

RE: [sqlite] How to restrict the peak heap usage during multiple inserts and updates?

2007-05-29 Thread Christian Smith
Kalyani Tummala uttered: I am planning to use sqlite as a database for storing and retrieving media data of about 5-10k records in a device whose main memory is extremely small. A sequence of insert statements increasing the heap usage to nearly 70K(almost saturating point) which is crashing my

Re: [sqlite] Does Attach improve Concurrency ?

2007-06-05 Thread Christian Smith
[EMAIL PROTECTED] uttered: When you have a connection with multiple attached databases and the connection acquires an exclusive lock, does it always lock all attached databases or does it keep track of which databases require the lock? 1st process: C:\Documents and Settings\Administrator\Pul

Re: [sqlite] Does Attach improve Concurrency ?

2007-06-05 Thread Christian Smith
Eduardo Morras uttered: At 19:32 01/06/2007, you wrote: When you have a connection with multiple attached databases and the connection acquires an exclusive lock, does it always lock all attached databases or does it keep track of which databases require the lock? Does using separate database

Re: [sqlite] Proper way to transfer a live sqlite database

2007-06-18 Thread Christian Smith
Rich Rattanni uttered: The databases will be in flux, and I didnt necessairly want to suspend the application that is performs reads and writes into the database. A simple copy worries me because it seems like messing with SQLITE on the file level is dangerous since you circumvent all the protec

Re: [sqlite] Journal File Optimization

2007-06-18 Thread Christian Smith
Andre du Plessis uttered: How can one optimize the creation of the journal file. The problem is this, for our system which is an event based one each message needs to be insterted and committed to the database (guaranteed), this results in a commit per insert, this was obviously unacceptably slo

Re: [sqlite] Recovery After Crash

2007-06-18 Thread Christian Smith
Asif Lodhi uttered: Hi Kees, Thanks for replying. On 6/17/07, Kees Nuyt <[EMAIL PROTECTED]> wrote: >... thankful if you experts would give me an "accurate" and fair >picture of the crash-recovery aspects of SQLite - without any hype. I'm not sure if you would qualify this as hype, but sqlite

Re: [sqlite] Lemon Parser - Modular & Extensible ?

2007-06-18 Thread Christian Smith
Uma Krishnan uttered: Hello: Is lemon parser modular and extensible? Extensible to do what? It generates parsers, and is self contained. It does a single job, and does it well. What more could you ask for? Thanks Uma Asif Lodhi <[EMAIL PROTECTED]> wrote: Hi Everybody, I have jus

Re: [sqlite] Lemon Parser - Modular & Extensible ?

2007-06-19 Thread Christian Smith
Uma Krishnan uttered: Hey, There's no need to be offensive. I did not mean to be critical. Far from it, it does a great a job (far more than I'm capable of producing). What I was trying to find out was, if it is possible for a .y files to be broken such that it can be built on top on other .y

Re: [sqlite] Cache invalidation after insert statements.

2007-06-19 Thread Christian Smith
pompomJuice uttered: I suspected something like this, as it makes sense. I have multiple binaries/different connections ( and I cannot make them share a connection ) using this one lookup table and depending on which connection checks first, it will update the table. What is your working se

Re: [sqlite] Converting from 2.8.x to 3.x?

2007-06-20 Thread Christian Smith
Gilles Ganault uttered: Hello As we move from a 2.8.x file-based solution to a 3.x c/s solution, we'll have to convert databases from one format to the other. What's the easiest way to do this? sqlite olddb .dump | sqlite3 newdb Thank you G. Christian -- /"\ \ /ASCII R

Re: [sqlite] Milliseconds

2007-07-13 Thread Christian Smith
John Stanton uttered: The Sqlite date/time routimes have a resolution to seconds, not milliseconds. If you want milliseconds from SQL implement your own user defined functions which give you milliseconds. You would access the time functions using the API of the underlying OS. You might choo

Re: [sqlite] Get the data from previous months: please, help me to optimize the query...

2007-07-13 Thread Christian Smith
Joe Wilson uttered: CREATE TABLE 'Months' ( IDMonth INTEGER PRIMARY KEY NOT NULL, MonthRef INTEGER ); (where MonthRef is the date of the first day of the month - created in the code) Using what epoc? CustomerData -- CREATE TABLE 'CustomerData'

Re: [sqlite] Milliseconds

2007-07-15 Thread Christian Smith
Scott Baker uttered: Christian Smith wrote: If you use the julianday representation, the integer component is the number of days since "noon in Greenwich on November 24, 4714 B.C", with the fractional part being the fraction of that day. Hence, the resolution is determined by the

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-01 Thread Christian Smith
Lokesh Babu uttered: Hello Folks, When I perform the DELETE operation on a Table using In-Memory Database (":memory:"), the memory usage increases. I tried using PRAGMA auto_vacuum=1; /* result - nothing works */ Even I tried using VACUUM table_name; /* this too isn't work */ if I perform DRO

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-02 Thread Christian Smith
xcess memory back to the operating system. I don't know of specific instances of libc that do this, so I can't help further, sorry. Thanks On 8/1/07, Christian Smith <[EMAIL PROTECTED]> wrote: Lokesh Babu uttered: Hello Folks, When I perform the DELETE operation on a

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-03 Thread Christian Smith
uests. Christian Smith wrote: Lokesh Babu uttered: Hello Folks, When I perform the DELETE operation on a Table using In-Memory Database (":memory:"), the memory usage increases. I tried using PRAGMA auto_vacuum=1; /* result - nothing works */ Even I tried using VACUUM table_name; /* this too is

Re: [sqlite] [SQLite improve productivity]

2007-08-05 Thread Christian Smith
A common issue of high latency transactions. SQLite has a high per-transaction overhead, which can be amortized across multiple INSERTs or UPDATEs to improve the average INSERT rate. You are doing a single INSERT per transaction, so wrap multiple INSERTs inside a single "BEGIN" ... "END" transa

Re: [sqlite] sqlite as server queries

2007-08-06 Thread Christian Smith
Edwin Eyan Moragas uttered: hi group, i have several small questions for the group any experiences or thoughts shared would be greatly appreciated. 1) anybody used sqlite as a sql server? i'm thinking of say using the embedded sqlite in PHP5 or similar. 2) anybody ever implemented something l

Re: [sqlite] [SQLite improve productivity]

2007-08-06 Thread Christian Smith
Igor Mironchick uttered: Thx, very helpfull reply. One more question: is it need to do "END" after "BEGIN" or enought "COMMIT"? You can use "COMMIT". Probably should do, as it is more descriptive about what is happening. Check the docs for transaction commands: http://www.sqlite.org/lang_t

Re: [sqlite] sqlite as server queries

2007-08-07 Thread Christian Smith
Edwin Eyan Moragas uttered: On 8/6/07, Christian Smith <[EMAIL PROTECTED]> wrote: 2) anybody ever implemented something like a single process of sqlite doing queries for a lot of networked clients? A few people have implemented such a solution. It loses one of the benefits of

Re: [sqlite] version 3.5.0 - Segv

2007-09-02 Thread Christian Smith
[EMAIL PROTECTED] uttered: [EMAIL PROTECTED] wrote: Ken <[EMAIL PROTECTED]> wrote: Recompiled with: gcc -DSQLITE_THREADSAFE -I. -I../src ^^^ Should be -DSQLITE_THREADSAFE=1 The =1 is important in this case. This problem will likely come up again. To try and work

Re: [sqlite] Difference between OR and IN [http://www.sqlite.org/php2004/page-052.html]

2007-09-02 Thread Christian Smith
Once you get your first row back (corresponding to (a==1), simply halt there and sqlite3_finalize() or sqlite3_reset the statement. You control the execution and how many rows you want back. RaghavendraK 70574 uttered: Hi, Ok. Is there any way to tell the VDBE to stop execution moment it g

Re: [sqlite] multiple connections

2007-09-10 Thread Christian Smith
Joe Wilson uttered: --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: In 3.5, cache can be shared between all threads, but shared cache is still disabled by default. You have to invoke sqlite3_enable_shared_cache() to turn it on. I put a comment in the documentation that we might turn shared c

Re: [sqlite] SQLite version 3.6.14

2009-05-08 Thread Christian Smith
On Wed, May 06, 2009 at 10:36:50PM -0400, D. Richard Hipp wrote: > > A new optional extension is included that implements an asynchronous I/ > O backend for SQLite on either windows or unix. The asynchronous I/O > backend processes all writes using a background thread. This gives > the appea

Re: [sqlite] SQLite version 3.6.14

2009-05-08 Thread Christian Smith
On Fri, May 08, 2009 at 05:32:45PM +0700, Dan wrote: > > On May 8, 2009, at 5:21 PM, Christian Smith wrote: > > > On Wed, May 06, 2009 at 10:36:50PM -0400, D. Richard Hipp wrote: > >> > >> A new optional extension is included that implements an > >> as

Re: [sqlite] Slow Transaction Speed?

2009-06-08 Thread Christian Smith
On Wed, May 27, 2009 at 08:05:00AM -0400, pyt...@bdurham.com wrote: > Dr. Hipp, > > > Your OS and filesystem configuration have a big impact too. I've notice, > > for example, that transactions are really slow on RieserFS on Linux > > compared to Ext3. > > In your experience, which Linux file s

Re: [sqlite] very large SQLite tables

2009-07-18 Thread Christian Smith
On Wed, Jun 24, 2009 at 02:21:09PM -0500, Matthew O'Keefe wrote: > > > We are using SQLite for indexing a huge number (i.e., 100 million to 1 > billion) of key pairs > that are represented by an 88-byte key. We are using a single table with a > very large number of rows (one for each data chunk),

Re: [sqlite] using lemon to create a c++ parser class

2007-12-09 Thread Christian Smith
Wilson, Ron uttered: It has been a very long time since I have tinkered with lex/yacc but my current project requires a parser. I'm thinking of learning lemon. Frankly, the sqlite code base is far more complex than what I will implement. Is anyone willing to share a lemon parse.y code exampl

Re: [sqlite] Performance.....

2008-03-05 Thread Christian Smith
On Wed, Mar 05, 2008 at 10:21:58AM -0500, [EMAIL PROTECTED] wrote: > > > I'm in the process of architecting the software for an embedded Linux system > that functions as a remote and local user interface to a control system. > There > will be a lot of analog (fast) data arriving via SPI bus and I

Re: [sqlite] Performance

2008-03-06 Thread Christian Smith
On Wed, Mar 05, 2008 at 09:02:17PM -0500, James Kimble wrote: > > > One thing I can highly recommend on embedded systems, especially flash > > based ones, is turn pragma synchronous to off. Having sqlite write every > > record modification to the flash, is a stunningly expensive process, > > even

Re: [sqlite] Where is the database file created?

2008-03-22 Thread Christian Smith
On Sat, Mar 22, 2008 at 06:44:45PM +0900, Fred Janon wrote: > Hi, > > I read the documentation, features and faq and could not find anything that > specifies where (which directory) the database file is stored. I launched > sqlite3.exe on windows without a database name, using the '.databases' > c

Re: [sqlite] Major memory leak

2008-03-23 Thread Christian Smith
On Fri, Mar 21, 2008 at 10:41:10AM -0400, Rob Richardson wrote: > My SQLite library is built from the single translation unit > sqlite.c/sqlite.h. That file contains the version number 3.3.17. > > I do not have valgrind, but circumstantial evidence that this is a > SQLite problem is strong. When

Re: [sqlite] Why is SQLite so slow across a network (afp Mac OS X)?

2008-05-23 Thread Christian Smith
On Tue, May 13, 2008 at 11:15:51PM -0600, Peter K. Stys wrote: > Hi Folks: > I'm new to this list and just came across a major issue so I thought I'd > post here: I'm using SQLite (from REALbasic which uses the SQLite DB engine > for SQL support) to store image files, and while R/W to local files i

Re: [sqlite] Why is SQLite so slow across a network (afp Mac OS X)?

2008-05-24 Thread Christian Smith
On Fri, May 23, 2008 at 12:55:47PM -0600, Peter K. Stys wrote: > On Fri, May 23, 2008 at 4:31 AM, Christian Smith < > [EMAIL PROTECTED]> wrote: > > > On Tue, May 13, 2008 at 11:15:51PM -0600, Peter K. Stys wrote: > > > Hi Folks: > > > I'm new to this

Re: [sqlite] Strange Behaviour on Solaris 8 on Sparc

2006-04-05 Thread Christian Smith
On Wed, 5 Apr 2006, Phuah Yee Keat wrote: >Hi, > >I am currently running some tests to decide whether to use sqlite, and >bump into some strange behavior. I compiled sqlite 3.3.4 from source and >installed it on a solaris 8 on sparc without any updates. I run the same >scripts (which insert 1000 e

Re: [sqlite] www.sqlite.org Server setup

2006-04-07 Thread Christian Smith
On Fri, 7 Apr 2006, Dan Kennedy wrote: > >> The same virtual server hosts multiple websites. Besides >> SQLite it hosts: >> >>http://www.cvstrac.org/ >>http://canvas3d.tcl.tk/ >>http://tkhtml.tcl.tk/ > >http://3dcanvas.tcl.tk :) Mmmm, triangles:) > > >_

Re: [sqlite] MMAP

2006-04-18 Thread Christian Smith
On Sun, 16 Apr 2006, John Stanton wrote: >I wonder if members can help me with some advice. I have a program >which is a multi-threaded application server with Sqlite embedded which >runs on Unix and Windows. For an i/o buffer per thread I have the idea >of using a mmap'd file so that it can be

Re: [sqlite] Is it safe to read or write a table while being indexed?

2006-04-18 Thread Christian Smith
On Sat, 15 Apr 2006, Tito Ciuro wrote: >Hello, > >I was wondering whether it is safe to read or write a table while >being indexed. Here's a scenario: for batch imports, it's sometimes >better to DROP the indexes, do the INSERTs and then recreate the >relevant indexes. Indexing may take a little b

Re: [sqlite] MMAP

2006-04-19 Thread Christian Smith
On Wed, 19 Apr 2006, John Stanton wrote: >Chris, Thanks for the very pertinent comments on segment linking. > >I am not sending an Sqlite database. It is the output from my program, >principally assembled HTML/PDF/PostScript and similar. > >I want to avoid buffer shadowing on the content my progr

Re: [sqlite] Direct use of SQLite btree functions / performance

2006-04-20 Thread Christian Smith
On Wed, 19 Apr 2006, Joe Wilson wrote: >--- [EMAIL PROTECTED] wrote: >> Joe Wilson <[EMAIL PROTECTED]> wrote: >> > >> > If you read the blob all in at once, true. >> > But doesn't sqlite3BtreeData() allows you to read a partial chunk of >> > data from the blob at an arbitrary offset? This could be

Re: [sqlite] MMAP

2006-04-20 Thread Christian Smith
At the risk of this turning into another argument between us... On Thu, 20 Apr 2006, John Stanton wrote: >Q How do programs get to be slow and bloated? >A One small inefficiency at a time. > >It is just as inefficient to send dynamically created content through a >series of buffers as it is to s

Re: [sqlite] upgrading versions of database files across version of SQLite

2006-04-20 Thread Christian Smith
On Thu, 20 Apr 2006, Steve Bland wrote: > We have been using SQLite ( v2.8.6 ) for a while now and as part of a > new release were thinking of moving ahead to a more current version. > > But that is where the issues began. I did search the archives, but found > noting of any real use on this. The

Re: [sqlite] Using sqlite3_open or sqlite3_open16?

2006-04-20 Thread Christian Smith
On Thu, 20 Apr 2006, DBTools Software wrote: >Hi, > >I have an application that needs to open a database in the users's personal >folder. I noticed that in some circunstances the sqlite3_open fail as the >filename is in UTF16 format. I don't know that in advance so I could open >the db with sqlite

Re: [sqlite] Rule of thumb for estimating index size

2006-04-21 Thread Christian Smith
On Fri, 21 Apr 2006, John Newby wrote: >A little off subject I know, but what is the purpose of an index? Just like in a book. If you want to search for particular terms in a book, you look up the page number in the index. In a database, fields are indexed, so you can see which rows contain par

Re: [sqlite] Rule of thumb for estimating index size

2006-04-21 Thread Christian Smith
On Fri, 21 Apr 2006, Rusty Conover wrote: >Hi, > >Is there an easy way to get an estimate on the space used by an >existing index? If not what is a good guess on how to estimate the >size? > >My guess would be (assuming text fields are being indexed): > >[total length of all index keys] + [number

Re: [sqlite] SQLite on limited Memory

2006-04-25 Thread Christian Smith
On Mon, 24 Apr 2006, Tony Fenleish wrote: >I've been developing an app on a linux embedded device with 128 M of RAM, >although the available RAM for queries is less than that. Now that the >databases are getting a little larger (120 MB), I'm having problems with >some queries that have large resu

Re: [sqlite] create unique index quickly

2006-05-21 Thread Christian Smith
On Sat, 20 May 2006, Brannon King wrote: John Stanton wrote: You don't seem to need a data manipulation system like Sqlite, more a form of high volume storage. Do you really need elaborate SQL, journalling, ROLLBACK and assured disk storage? Di you consider some form of hashed storage, perh

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Christian Smith
On Wed, 24 May 2006, Mikey C wrote: I would rather add these functions directly to the core SQLite DLL in C in and compile them directly into the code (using a conditional). They then register this function by adding it to the array of existing functions: ... This seems to work (I've tried i

Re: [sqlite] In the year 4461763

2006-05-24 Thread Christian Smith
On Tue, 23 May 2006, Chris Werner wrote: Hello, I am just curious about SQLite's date and time manipulation functions. I am using the sqlite3 command line interface on the above described platform. When I select a datetime for 2^47: sqlite> SELECT datetime(140737488355328, 'unixepoch'); 44

Re: [sqlite] Re: DLLs containing user-defined SQL functions

2006-06-07 Thread Christian Smith
On Wed, 7 Jun 2006, Igor Tandetnik wrote: [EMAIL PROTECTED] wrote: "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: On Windows, the loader works in a very different way. Basically, export/import connections are established at link time, not at load time. The loader does not perform a symbol search

Re: [sqlite] Re: DLLs containing user-defined SQL functions

2006-06-07 Thread Christian Smith
On Wed, 7 Jun 2006, Igor Tandetnik wrote: Dennis Jenkins <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: On Windows, the loader works in a very different way. Basically, export/import connections are established at link time, not at load time. T

RE: [sqlite] Problems with multiple threads?

2006-06-07 Thread Christian Smith
On Wed, 7 Jun 2006, Jiri Hajek wrote: However, right after fixing this, I found another problem. It certainly can be my fault, but I don't see how could it be: If I don't use transactions, multiple threads seem to proceed well, but then right after I add BEGIN and COMMIT to some place, all threa

Re: [sqlite] how to recover a corrupted database?

2006-06-09 Thread Christian Smith
On Thu, 8 Jun 2006, [EMAIL PROTECTED] wrote: I also occasionally back up the database using subversion ("svn commit"), while the app that uses it is still running. My belief is that subversion only reads a file to commit it, and doesn't write to it, but it's possible that is wrong. Subvers

Re: [sqlite] disabling large file support

2006-06-09 Thread Christian Smith
On Thu, 8 Jun 2006, Doug Shelton wrote: How does one disable large file support? As mentioned in comments, I've added -DSQLITE_DISABLE_LFS to the Makefile, but continue to get errors indicating lack of kernel support for large files. The following lines are the end of my compile (so you can

Re: [sqlite] SQLite 3.3.6 - possibly memory leak

2006-06-12 Thread Christian Smith
Sasa Zeman uttered: I working with my own SQLite wrapper for Delphi, with the statically linked SQLite 3.3.6. File variant works fine: SQLite3_Open('Test.sqb',db); SQLite3_Exec(db,'DROP TABLE TEST',NIL,NIL,ErrMsg); ... However memory variant rise a memory leak report: SQLite3_Open(':memory

Re: [sqlite] MacOS X build failure

2006-06-12 Thread Christian Smith
Kon Lovett uttered: Hi, The following occurs building the CVS head w/ gcc 4.0.1 on MacOS 10.4.6: ./libtool --mode=compile gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I../sqlite/src -DNDEBUG -DSQLITE_ALLOW_XTHREAD_CONNECT=1 -I/usr/local/include -DTHREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=1

Re: [sqlite] How to realize the ROWID in a view?

2006-06-12 Thread Christian Smith
PY uttered: Hi All, I have a problem about the ROWID in a view. I want to simulate a ROWID in a view just like the same purpose in a table. For Example: Create Table foo(id INTEGER PRIMARY KEY AUTOINCREMENT, x TEXT); insert into foo(x) values('X'); insert into foo(x) values('Y'); insert into

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-14 Thread Christian Smith
John Stanton uttered: Jay Sprenkle wrote: On 6/14/06, RohitPatel <[EMAIL PROTECTED]> wrote: Any solution to that (which does not force end-user of app to manage sqlite file fragments or to defragment disk) ? A scheduled task or cron job is trivial to implement and does not add any e

Re: [sqlite] SQLite Vs VistaDB - Comparison ???

2006-06-16 Thread Christian Smith
Bogus�aw Brandys uttered: [EMAIL PROTECTED] wrote: Mikey C <[EMAIL PROTECTED]> wrote: Please implement table and row level locking. :-) People commonly believe that doing so must be easy. I certainly get a lot of requests for it from people who think they know how. But in fact, row-level l

Re: [sqlite] How to port SQLite to a uc/os-II OS with customized file system?

2006-06-21 Thread Christian Smith
Ҷ�� uttered: Hi,all I'm trying to bulid a database engine based on uc/os-II RTOS with my own customized file system(similar with FAT16, but not exactly the same). I find that SQLite is a good choice. I have read the SQLite source code for several days, but I still have no idea where I shou

Re: [sqlite] Delete performance vs. Insert performance

2006-06-21 Thread Christian Smith
Insun Kang uttered: Hi. I tested big deletes performance and big insert performance on a Windows CE device in various cache size configurations. ( 1MB, 100KB, 50KB ) Insert 3000 records performs within 23sec, 43sec and 61sec, with respect to each cache size configuration. However, delete 1000

Re: [sqlite] Re: Opening the database file for read on Windows XP

2006-06-21 Thread Christian Smith
Igor Tandetnik uttered: Ran <[EMAIL PROTECTED]> wrote: Thanks for your reply. I know that I should lock the file before copying it, and the "BEGIN IMMEDIATE" is indeed a nice trick. However, I think I didn't explain my problem clearly. I would like to copy that file _without_ using the sqlite l

Re: [sqlite] Delete performance vs. Insert performance

2006-06-22 Thread Christian Smith
Jay Sprenkle uttered: On 6/21/06, Christian Smith <[EMAIL PROTECTED]> Adding to the free list will touch each page at most once, and thus caching adds no benefit (and has no loss for a smaller cache.) Inserting may touch each page multiple times, for such operations as rebalancing th

Re: [sqlite] Re: Re: Opening the database file for read on Windows XP

2006-06-22 Thread Christian Smith
Igor Tandetnik uttered: Christian Smith <[EMAIL PROTECTED]> wrote: Igor Tandetnik uttered: You want to enable sharing. Pass FILE_SHARE_READ | FILE_SHARE_WRITE as the third parameter. Surely not FILE_SHARE_WRITE! You don't want other processes writing the database while you&#x

Re: [sqlite] How to port SQLite to a uc/os-II OS with customized file system?

2006-06-23 Thread Christian Smith
ginal Message - From: "Christian Smith" <[EMAIL PROTECTED]> To: Sent: Wednesday, June 21, 2006 7:04 PM Subject: Re: [sqlite] How to port SQLite to a uc/os-II OS with customized file system? Ҷ uttered: Hi,all I'm trying to bulid a database engine based on uc/os-II RTOS w

Re: [sqlite] sqlite3_free()

2006-06-27 Thread Christian Smith
[EMAIL PROTECTED] uttered: Two SQLite APIs, sqlite3_exec() and sqlite3_mprintf(), return strings in memory obtained from a malloc-like memory allocator. The documentation has always said that you need to use sqlite3_free() in order to free those strings. But, as it happens, it has until now wor

Re: [sqlite] sqlite3_free()

2006-06-27 Thread Christian Smith
[EMAIL PROTECTED] uttered: Christian Smith <[EMAIL PROTECTED]> wrote: My own personal opinion on these coding style issues is if the API requires special handling of cleanup, then the API should do the cleanup. Returning an allocated string that requires special cleanup result

Re: [sqlite] Hardcopy docs?

2006-06-27 Thread Christian Smith
Bernie Cosell uttered: On 26 Jun 2006 at 14:14, [EMAIL PROTECTED] wrote: "Bernie Cosell" <[EMAIL PROTECTED]> wrote: I'll confess that I am an old-fashioned "hardcopy" kind of guy... are the sqlite3 docs available in any sort of reasonably-printable format? http://www.apress.com/book/bookDi

Re: [sqlite] sqlite3_free()

2006-06-27 Thread Christian Smith
Dennis Cote uttered: Christian Smith wrote: Yes, of course, Windows sticks it's oar in again. Going back to the previous DLL discussion, this alone is surely confirmation of why the Windows DLL system sucks. This really has nothing to do with the Windows DLL system. It is simply the

Re: [sqlite] sqlite3_free()

2006-06-27 Thread Christian Smith
Andrew Piskorski uttered: On Tue, Jun 27, 2006 at 04:14:37PM +0100, Christian Smith wrote: Anyway, it's not difficult to provide thread local storage. HP-UX's netdb.h functions (gethostbyname etc.) are fully re-entrant despite returning 'static' data, for example. Other

Re: [sqlite] Huge performance difference between SQLite on Windows XP and Windows 2000

2006-06-27 Thread Christian Smith
Lukáš Neumann uttered: Hello, I am using SQLite DLL version 3.2.1 to access a single file database. I use sqlite3_exec() to call this simple query: BEGIN; INSERT INTO Messages (IDMessage, Body) VALUES (1054, 'Test'); COMMIT; When the application runs under Windows XP, the query takes unno

Re: [sqlite] sqlite3_free_table question

2006-06-29 Thread Christian Smith
Dennis Cote uttered: Your call to sqlite3_free_table is correct. You free the error message by calling sqlite3_free(tresult.err_msg). If either pointer returned by sqlite3_get_table() is NULL, then no memory was allocated, so there is no need to free it, however I believe it should be safe

Re: [sqlite] Problem with compiling under HP-UX

2006-07-03 Thread Christian Smith
Henrik Goldman uttered: Hi, I have a new HP-UX maching running latest official OS B.11.23 and has gcc 4.1.1. The problem is that when I try to configure I get an error: bash-3.00# ./configure CFLAGS="-O2 -lp64" --enable-threadsafe checking build system type... ia64-hp-hpux11.23 checking host

RE: [sqlite] endian-specific code in pure c source release?

2006-07-04 Thread Christian Smith
Pat Wibbeler uttered: A quick search through the sqlite source release led me to believe that the source may be coded around endian issues. I guess what I'm looking for is affirmation or denial of my cursory reading. If the source is endian dependent, how does sqlite configure and/or make dete

Re: [sqlite] Using sqlite on Nintendo DS / PSP

2006-07-06 Thread Christian Smith
ahochan uttered: I'm building a dictionary application that will run on Nintendo DS and PSP. I'm considering using sqlite to store the database which will will be read-only, and embedded on rom. Is it possible to get sqlite to read the database directly from such a pre-allocated memory area? U

Re: [sqlite] Compressing the DBs?

2006-07-06 Thread Christian Smith
[EMAIL PROTECTED] uttered: Mikey C <[EMAIL PROTECTED]> wrote: Not sure what you mean there DRH, but I set compression on one of my database files on NTFS and file size shrunk from 1,289,216 bytes to 696,320 bytes. And of course the whole compression / decompression process is completely trans

Re: [sqlite] Compressing the DBs?

2006-07-06 Thread Christian Smith
Gussimulator uttered: I've been using SQLite for a very short period of time and so far Its doing a great job for my application (single user, quite a big amount of data though). Now, since theres a lot of repetitive data, I thought that compressing the database would be a good idea, since,

Re: [sqlite] Fwd: sqlite3_busy_timeout() on NetBSD

2006-07-07 Thread Christian Smith
[EMAIL PROTECTED] uttered: =?ISO-8859-1?Q?Tobias_Rundstr=F6m?= <[EMAIL PROTECTED]> wrote: Is there something wrong with sqlite3_bus_timeout on NetBSD? I've not had any problems with sqlite3_busy_timeout on Linux. And I do not have NetBSD handy for testing. Not sure what the problem might b

Re: [sqlite] callback function parameters in UTF-16?

2006-07-10 Thread Christian Smith
Tzu-Chien Chiu uttered: OK. But what I don't understand is: is this (lack of sqlite3_exec16) by design? The sqlite3_exec function is a deprecated interface used by earlier SQLite releases. New applications should use, for performance reasons if nothing else, sqlite3_compile/sqlite3_step/sql

[sqlite] Curious join issue

2006-07-10 Thread Christian Smith
Hello JOIN expoerts:) I have the following schema: CREATE TABLE instances ( instanceid integer primary key, type, instance); CREATE INDEX instances_type_instance ON instances(type,instance); CREATE TABLE instance_fields ( instanceid references instances(instanceid), field, subscript

Re: [sqlite] Curious join issue

2006-07-11 Thread Christian Smith
) ); DRH, Is this expected behaviour? I'd have thought the manifest typing would have seen to that, but it appears that join fields need to be the same type. Christian Christian Smith uttered: Hello JOIN expoerts:) I have the following schema: CREATE TABLE instances ( instanceid in

Re: [sqlite] Curious join issue

2006-07-11 Thread Christian Smith
[EMAIL PROTECTED] uttered: Christian Smith <[EMAIL PROTECTED]> wrote: select FROM instances as i inner join instance_fields as count using(instanceid) inner join instance_fields as first using (instanceid) inner join instance_fields as last using (instanceid) inne

Re: [sqlite] Curious join issue

2006-07-11 Thread Christian Smith
[EMAIL PROTECTED] uttered: "Brandon, Nicholas (UK)" <[EMAIL PROTECTED]> wrote: I don't want to hijack this thread (not too much anyway) but this got me thinking about JOINs since I have a database that uses a similar concept (one table holds a number of key-value pairs for another). As I unde

Re: [sqlite] problems compiling with arm-linux-gcc

2006-07-12 Thread Christian Smith
Keiichi McGuire uttered: This is a bit confusing, especially since if I compile it using gcc it will compile w/o any problems. What would this "incompatibility" mean and what would a solution be to make it compatible and be found by the compiler? Chances are that the libsqlite.a you're tryin

Re: [sqlite] SQL error: database disk image is malformed

2006-07-12 Thread Christian Smith
Bull219 uttered: Dear all, I am developping a freeware which uses SQLite. One of my beta testers informed me about an issue he had: with his DB, following the query which is sent to the DB, I have the error in the subject of this email. I did some testing, and when I succeeded in reproducing

Re: [sqlite] filter and sort in CREATE VIEW or CREATE TABLE ?

2006-07-13 Thread Christian Smith
Inline. Jens Miltner uttered: Hi all, I need to create a temporary table holding ID column values from a number of tables, so that I have a unique way to access the data for display purposes: say I have 2 related tables [snip schema] When displaying a filtered subset of the persons with a

Re: [sqlite] How do you find out the names of the fields within a table?

2006-07-13 Thread Christian Smith
John Newby uttered: Hi, how can I find out the names of the fields within a given table? I've tried "pragma table_info(test);" but this brings back too much info, I just require the names as I'll be storing them in an array within my application. Then just cherry pick the information you re

Re: [sqlite] using max value

2006-07-13 Thread Christian Smith
Keiichi McGuire uttered: I'm a bit stuck on this one problem I have this simple table that has two fields: id and value. What I want to do is to get the largest id (the last entry) and then add an arbitrary number to the value that's in the same entry as that one, and put the result in the nex

Re: [sqlite] How do you find out the names of the fields within a table?

2006-07-13 Thread Christian Smith
John Newby uttered: Hi Martin, I'm not sure, I don't use VB that often, I just need to use it for my Uni project at the moment. With all due respect to your University, but VB sucks as a teaching language IMO. Doesn't your Uni have better development tools? Any professor that advocates VB i

Re: [sqlite] using max value

2006-07-13 Thread Christian Smith
Jay Sprenkle uttered: On 7/13/06, Christian Smith <[EMAIL PROTECTED]> wrote: You can't use aggregate functions in WHERE clauses. Also, you can't use a select as the value in an insert. You can insert from the results of an insert. uh...It seems to work: The OP was trying

Re: [sqlite] How do you find out the names of the fields within a table?

2006-07-13 Thread Christian Smith
Why not just run the pragma twice, once to count the number of columns, allocate the array, then again to fill the array. It's not a heavyweight operation. Many thanks John On 13/07/06, Christian Smith <[EMAIL PROTECTED]> wrote: John Newby uttered: > Hi Martin, I'm not sure,

Re: [sqlite] How to port the SQLite

2006-07-14 Thread Christian Smith
Vivek R uttered: Hi , I am New bee to the group and SQLite. Can anyone explain me How to port the SQLite to DVD or Consumer products or any other Embedded Systems. Where I can look for it ? What and all things to be considered while porting. Which is the best version to port to consumer product

Re: [sqlite] This great!

2006-07-17 Thread Christian Smith
Cesar David Rodas Maldonado uttered: I am wondering if it will have a better performance if i split every index and table into different files, i know that i will loose the LITE concept, but i am wondering if it will have a better performance... Not unless each individual file is on a differ

Re: [sqlite] Order of columns within a CREATE TABLE statement

2006-07-20 Thread Christian Smith
w b uttered: Hi all, Just had a quick question with regards to the order of the columns within a create table statement I have a few tables that use the BLOB type for storing various lengths of binary data and I was wondering if its better (more efficient) to always declare columns of this ty

RE: [sqlite] SQLiteSpy vs. SQLite.dll speed comparison

2006-07-21 Thread Christian Smith
michael cuthbertson uttered: Brannon: Thank you for your thoughts. To be clear, the 'optimize for speed' setting in MY release is actually slower than MY debug version - I know nothing about Ralf's settings. That issue is separate from SQLiteSpy - I didn't mean to conflate them. And the issue i

  1   2   3   4   >