[sqlite] records sorted or not

2005-09-06 Thread Tom Deblauwe
Hello, If I do a select query, and that query uses an index, will the results come out sorted like the index? Or is that random? Kind regards, Tom

[sqlite] How to reduce the flash erasing times when I using sqlite

2005-09-06 Thread SH L
I found sqlite will update some fixed places frequently in the database file when insert,update or even create operation happens.It means that if my database file in flash and I do high-frequency insert or update(about 3000/day).The flash will die after a while.How can I solve this problem. Thanky

[sqlite] All transactions are Database locks?

2005-09-06 Thread Matt Froncek
Are all transactions database locks (not table locks)? If I prepare a select statement and start stepping on Table A on process one and pause before finializing and do an update on Table B with process two or even the same process I will get a database is locked error? Do I understand that this is

Re: [sqlite] SQLite where clause parsing?

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 13:07 -0700, R S wrote: > Hi, > I have a million records in my DB. I tried using .explain on and ran the > query below which took a long time although I just want the last 100,000 > records...(It ran much faster when my table had a 100,000 records) so I > assume it is relat

Re: [sqlite] need to write during a long read

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 15:49 -0400, Mark Drago wrote: > 2. I could continue to write to the database in the single thread, but > if the write fails, add the data to a queue and continue. Then, when > another piece of data has to be logged, and it succeeds, empty the queue > and write all of the da

[sqlite] SQLite where clause parsing?

2005-09-06 Thread R S
Hi, I have a million records in my DB. I tried using .explain on and ran the query below which took a long time although I just want the last 100,000 records...(It ran much faster when my table had a 100,000 records) so I assume it is related to how I constructed the statement. select columns f

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Robert Simpson
- Original Message - From: "D. Richard Hipp" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 06, 2005 8:53 AM Subject: Re: [sqlite] Please test on Win95/98/ME On Tue, 2005-09-06 at 08:35 -0700, Roger Binns wrote: > To sum up: You need to convert UTF-8 to UTF-16-LE first. Then, > if

[sqlite] need to write during a long read

2005-09-06 Thread Mark Drago
Hey Guys, I'm writing a web proxy in C for Linux that logs all of the connections that go through it to a sqlite database. There is then a PHP web GUI that allows the user to perform queries against all of the data in the log. Needless to say, this database can get fairly large. I use a 5 secon

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Jay Sprenkle
On 9/5/05, Ian Monroe <[EMAIL PROTECTED]> wrote: > > > > > SQLite has *never* supported the ability of a handle to be used > > by more than one thread. By luck, such use would sometimes work on > > some operating systems. But it would fail on others. Such a > > situation is very dangerous since if

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Kiel W.
Ian Monroe wrote: I see your just ignorant of how open source software gets released. Ian, You are right, I hope you will forgive my ignorance. Beyond that, it wasn't my place to criticize those projects even if I had fully understood the situation. --kiel

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Ulrik Petersen
Robert Simpson wrote: I'm back in the office today -- let me have a quick crack at the issue before you settle on something. I've got a pretty good idea how to clean it up. I don't like using the MSLU because its a dependency that up until now SQLite has not had. Since the unicows.dll is n

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Jay Sprenkle
> I suggest this approach: > > 1. Open the database file using sqlite3_open() > 2. Run sqlite3_exec("BEGIN IMMEDIATE"); > 3. Make a copy of the raw database file using whatever > high-speed file copy mechanism is at hand. > 4. sqlite3_close(); > > The BEGIN IMMEDIATE operation in step 2 will acqu

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Robert Simpson
I'm back in the office today -- let me have a quick crack at the issue before you settle on something. I've got a pretty good idea how to clean it up. I don't like using the MSLU because its a dependency that up until now SQLite has not had. Since the unicows.dll is not part of a standard Wi

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 11:09 -0400, John Duprey wrote: > I'd like to copy a database that may or may not be in use. Doing a > filesystem copy will not ensure a stable copy. Can I use the sqlite3 CLI and > some SQL to do this such that I can wrap it up into a script or do I need to > write my own

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 08:35 -0700, Roger Binns wrote: > > To sum up: You need to convert UTF-8 to UTF-16-LE first. Then, > > if the OS is NT, you can pass these to the ...W functions. > > Otherwise, you need to further convert to ANSI user codepage > > and pass it to the ...A functions. > > Al

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Kervin L. Pierre
Hello, Seems to me if your backup program does a "BEGIN EXCLUSIVE" before doing the file copy then you should be fine. Just my guess though. I believe an exclusive transaction should ensure that you are the only writer to the database. Regards, Kervin John Duprey wrote: I'd like to copy a

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Roger Binns
To sum up: You need to convert UTF-8 to UTF-16-LE first. Then, if the OS is NT, you can pass these to the ...W functions. Otherwise, you need to further convert to ANSI user codepage and pass it to the ...A functions. Alternatively tell people to link against unicows if they need win9x suppor

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Jay Sprenkle
On 9/6/05, John Duprey <[EMAIL PROTECTED]> wrote: > > What I'd like is a safe binary copy. > > From a previous post, I have seen someone suggest this: > attach 'foo.db' as bar; > create table baz as select * from bar.baz; > detach bar; > If I wrapped this in a loop for all tables it would probabl

[sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread John Duprey
I'd like to copy a database that may or may not be in use. Doing a filesystem copy will not ensure a stable copy. Can I use the sqlite3 CLI and some SQL to do this such that I can wrap it up into a script or do I need to write my own program, that gets a lock and re-creates the DB in a new file?

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Ralf Junker
1. You are still passing UTF-8 strings to Win95/98/ME file. No Windows version (not Win95 nor NT) accepts UTF-8 strings, especially not those ending with ...A and ...W. The only functions taking any other codepages are a few functions which especially deal with strings and codepage conversions.

[sqlite] ANN: Sqlite3Explorer 1.8 released

2005-09-06 Thread Cariotoglou Mike
Minor fix to work around a bug in pragma empty_result_callbacks, which makes Explorer incompatible with the ANALYZE command

RE: [sqlite] bug in sqlite 3.2.5 compilation and ANALYZE

2005-09-06 Thread Cariotoglou Mike
ok, I pinned it down. it is a genuine bug, and has nothing to do with dlls and wrappers. to reproduce, do this: 1. open the command-line utility on a database (or even with no database, it does not matter) 2. type this: SQLite version 3.2.5 Enter ".help" for instructions sqlite> pragma empty_Re

RE: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Cariotoglou Mike
I hope that this restriction is not enforced on windows, ever! I have an application that will be completely broken by this: it is an application server, that serves multiple clients, pools db connections, and hands them out on demand, protecting the pool with a number of mechanisms that have n