[sqlite] Strange Behaviour on Solaris 8 on Sparc

2006-04-04 Thread Phuah Yee Keat
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 entries without BEGIN/END block), on the same

Re: [sqlite] Performance Difference on Linux Kernel 2.4 and Kernel 2.6

2006-04-04 Thread Phuah Yee Keat
[EMAIL PROTECTED] wrote: Your script requires 1002 separate ACID transactions. Each such transaction should require at least 2 complete revolutions of your disk drive platter - meaning that the minimum time to complete your script should be 16 seconds. The 2.4 kernel finished faster than this,

Re: [sqlite] Probably, bug in SQLite (Or, what is wrong with this query?)

2006-04-04 Thread Joe Wilson
Re-run on Oracle 8.1.7 with the corrected SQL: select a, (select c from (select b + 1 as c from dual)) as d from (select 1 as a, 2 as b from dual) ORA-00904: invalid column name It did not like the 'select b' either. --- Alexander Kozlovsky <[EMAIL PROTECTED]> wrote: > Cory Nelson wrote: >

Re: RE: [sqlite] How to unsubscribe from this maillist ?

2006-04-04 Thread z-axis
Bill Giannotti! As i have lost my programming job for old age (38 years old), so i wanted to unsubscribe many maillists. However i feel sqlite can still help me. so i determine not to unsubscribe now ! regards!    2006-04-03 07:25:00 您在来信中写道: I had an issue with my computer

Re: [sqlite] Question on how to enter blobs in sqlite3

2006-04-04 Thread Roman
Hi Thomas, I have tried sqlite> select * from loc_configuration; 0|0|18|52|86|4|24|22|51|116|39|15|0|0|0|0|0|0|0|0|0|0|0|0 The blob is the one before the last one, and the length is the very last one The serials are second, third , fourth and fifth columns. sqlite> UPDATE loc_configuration

Re: [sqlite] Question on how to enter blobs in sqlite3

2006-04-04 Thread Thomas Chust
On Tue, 4 Apr 2006, Roman wrote: [...] I am using sqlite3 on am embedded platform. I am using c++ to enter data. I have BLOB field, and I do not know how to enter hex values from a data string. [...] Hello, if you need to put BLOB data verbatim into an SQL statement, SQLite3 supports

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Clark Christensen
You can get the underlying SQLite version from DBD-SQLite as $dbh->{sqlite_version}; Make sure you set $dbh->{AutoCommit=>0}. This will ensure you're always in a transaction. Without it, you're probably committing every row. From what I can tell, you can twiddle AutoCommit at any point in

[sqlite] Windows problem when updating

2006-04-04 Thread Milton Sagen
After a machine restart the first time I try to change a field in a record, on Windows, it takes an inordinately long time for the sqlite code to return, the amount of time is dependent on the size of the database but even for a 20 Meg one with about 4000 records, the time is in the order

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Gerry Snyder
Sripathi Raj wrote: I don't begin the transaction with begin. My assumption was that the first insert operation would automatically begin a transaction. It does. But, the transaction it starts ends with that insert, and a new transaction begins with the next insert. You need an explicit

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Sripathi Raj
On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 04, 2006 at 04:18:35PM -0700, Sripathi Raj wrote: > > On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote: > > > > > > > >> 3. The performance for inserts is really bad. Around 40k entries > > > takes a > > > > >>few hours.

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Nathan Kurz
On Tue, Apr 04, 2006 at 04:18:35PM -0700, Sripathi Raj wrote: > On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote: > > > > > >> 3. The performance for inserts is really bad. Around 40k entries > > takes a > > > >>few hours. What might I be doing wrong? I do a commit after > > > >>

RE: [sqlite] how to fix problem of lock

2006-04-04 Thread Marian Olteanu
How long does one INSERT take? Do you have long transactions with INSERTs? If you have one INSERT at a time and it doesn't take too long, and still you have reader starvation issues with the SELECTs, the only solution that I see is to queue requests and make sure that they are served on a

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Sripathi Raj
On 4/4/06, Nathan Kurz <[EMAIL PROTECTED]> wrote: > > > >> 3. The performance for inserts is really bad. Around 40k entries > takes a > > >>few hours. What might I be doing wrong? I do a commit after > > >>all the inserts. > > > > > > A few things to help with speed: > > > > > > 1. Use

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Nathan Kurz
> >> 3. The performance for inserts is really bad. Around 40k entries takes a > >>few hours. What might I be doing wrong? I do a commit after > >>all the inserts. > > > > A few things to help with speed: > > > > 1. Use DBI's prepared statements; eg, 1 prepare() and many execute(). > >

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Sripathi Raj
Darren Duncan wrote: > At 15:03 -0700 4/4/06, Sripathi Raj wrote: >> Hi, >> I have a few questions regarding SQLite. I'm using it on Windows and >> connecting to it from Perl. > > And I will answer some of them. > >> 1. How do I find out if the current version of DBD::SQLite uses SQLite >> 3.0or

Re: [sqlite] DBD Sqlite

2006-04-04 Thread Darren Duncan
At 15:03 -0700 4/4/06, Sripathi Raj wrote: Hi, I have a few questions regarding SQLite. I'm using it on Windows and connecting to it from Perl. And I will answer some of them. 1. How do I find out if the current version of DBD::SQLite uses SQLite 3.0or greater? DBD::SQLite versions >= 1.0

[sqlite] Question on how to enter blobs in sqlite3

2006-04-04 Thread Roman
Hello, I am using sqlite3 on am embedded platform. I am using c++ to enter data. I have BLOB field, and I do not know how to enter hex values from a data string. I am trying to use update, but how do I enter col_name=' data ' format? How does ' escaping work? I could not find help on the

Re: [sqlite] how to fix problem of lock

2006-04-04 Thread John Stanton
The method I have found works well and efficiently is to surround your Sqlite accesses with a semaphore and have accessing processes WAIT to get access to Sqlite. For best performance you would only block when an INSERT was in progress and let multiple SELECTs run concurrently. This assumes

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread drh
"Roger Binns" <[EMAIL PROTECTED]> wrote: > > If you call sqlite3_enable_shared_cache while > > another connection is open, you will get an > > SQLITE_MISUSE error. But you can ignore that > > error if you want. > > The doc is far scarier: > > This routine must not be called when any database

Re: [sqlite] Programmatic notification of BEGIN TRANSACTION?

2006-04-04 Thread drh
Mike Ashmore <[EMAIL PROTECTED]> wrote: > Hi, > I have some triggers that fire on INSERT, UPDATE, and DELETE to a > view. Those triggers calls a user-defined library function. What I > was wondering was, is there some way my library function can be > notified of the beginning and end of a

RE: [sqlite] how to fix problem of lock

2006-04-04 Thread Doug Nebeker
>From http://www.hwaci.com/sw/sqlite/whentouse.html "Situations Where Another RDBMS May Work Better" * High Concurrency SQLite uses reader/writer locks on the entire database file. That means if any process is reading from any part of the database, all other processes are prevented from writing

Re: [sqlite] how to fix problem of lock

2006-04-04 Thread Cesar David Rodas Maldonado
Thanx fred On 4/4/06, Fred Williams <[EMAIL PROTECTED]> wrote: > > I would suggest as a beginning: > > www.hwaci.com/sw/sqlite/whentouse.html > > www.hwaci.com/sw/sqlite/lockingv3.html > > www.hwaci.com/sw/sqlite/faq.html#q7 > > www.hwaci.com/sw/sqlite/faq.html#q8

RE: [sqlite] how to fix problem of lock

2006-04-04 Thread Fred Williams
I would suggest as a beginning: www.hwaci.com/sw/sqlite/whentouse.html www.hwaci.com/sw/sqlite/lockingv3.html www.hwaci.com/sw/sqlite/faq.html#q7 www.hwaci.com/sw/sqlite/faq.html#q8 www.sqlite.org/cvstrac/wiki?p=MultiThreading AND

Re: [sqlite] how to fix problem of lock

2006-04-04 Thread Cesar David Rodas Maldonado
Please people help me :D, the project will be open source... On 4/4/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: > > OK English is not my first language, i am from south America, from > Paraguay so i speak Spanish... > > I am doing a project in C multiplataform.. right it project

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread Roger Binns
If you call sqlite3_enable_shared_cache while another connection is open, you will get an SQLITE_MISUSE error. But you can ignore that error if you want. The doc is far scarier: This routine must not be called when any database connections are active in the current thread. Enabling or

Re: [sqlite] how to fix problem of lock

2006-04-04 Thread Cesar David Rodas Maldonado
OK English is not my first language, i am from south America, from Paraguay so i speak Spanish... I am doing a project in C multiplataform.. right it project like google, for a Linux. the project uses SQ Lite for repository. The software is a server which listen connection UDP. The server could

Re: [sqlite] Re: Db copy

2006-04-04 Thread Dennis Cote
Iulian Popescu wrote: I looked at the .dump feature implementation in shell.c as well as how vacuum is implemented. Based on that an idea will be to iterate through the metainformation on the SQLITE_MASTER table in order to recreate the new Db schema and for each table run SQL statements that

RE: [sqlite] Testing for table existence?

2006-04-04 Thread Marian Olteanu
sqlite_master table tells you everything about every object in the database -Original Message- From: Olaf Beckman Lapré [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 04, 2006 9:30 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Testing for table existence? Thanks, I implemented

Re: [sqlite] Testing for table existence?

2006-04-04 Thread Olaf Beckman Lapré
Thanks, I implemented this and it works. I also stumbled upon the CREATE TABLE IF NOT EXIST syntax and I was wondering if this wouldn't be a better idea, at the very least it would be more convenient. Olaf - Original Message - From: "Philipp Knüsel" <[EMAIL PROTECTED]> To:

[sqlite] Programmatic notification of BEGIN TRANSACTION?

2006-04-04 Thread Mike Ashmore
Hi, I have some triggers that fire on INSERT, UPDATE, and DELETE to a view. Those triggers calls a user-defined library function. What I was wondering was, is there some way my library function can be notified of the beginning and end of a transaction? For instance, if the user issues an

Re: [sqlite] Testing for table existence?

2006-04-04 Thread Philipp Knüsel
> Hi, > > How can I test for the existence of a single table in a SQLite database? > > I tried sqlite3_get_table with "select * from persons" to test for the > existence of the table 'persons' and I had hoped the return value would be > SQLITE_NOTFOUND in the case of a non-existent table.

[sqlite] Testing for table existence?

2006-04-04 Thread Olaf Beckman Lapré
Hi, How can I test for the existence of a single table in a SQLite database? I tried sqlite3_get_table with "select * from persons" to test for the existence of the table 'persons' and I had hoped the return value would be SQLITE_NOTFOUND in the case of a non-existent table. However, I got

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread drh
"Roger Binns" <[EMAIL PROTECTED]> wrote: > I'd like to use sqlite3_enable_shared_cache in > my APSW wrapper but I can't see a sensible > safe way of doing it. The wrapper already enforces > the conditions mentioned in the doc (all operations > on a handle happening in the same thread). > > It

Re: AW: [sqlite] [ANN] SQLite ODBC driver version 0.67

2006-04-04 Thread Christian Werner
[EMAIL PROTECTED] wrote: > > Hi, > > I just would like to point out that: > > - a zip-archive for the drivers ("no-install") is not provided That was my intention; is the ZIP version really necessary ? > - the documentation for sqliteodbc.c / sqliteodbc.h is missing Ditto, since SQLite

AW: [sqlite] [ANN] SQLite ODBC driver version 0.67

2006-04-04 Thread michael.hanssen
Hi, I just would like to point out that: - a zip-archive for the drivers ("no-install") is not provided - the documentation for sqliteodbc.c / sqliteodbc.h is missing Regards, Michael -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von

Re: [sqlite] sqlite3 dll symbols

2006-04-04 Thread Essien Essien
thanks you all for the explanations. It was a small project for a friend and nothing critical really. I'm no windows guru, and i'm not so sure i want to be (what with all the hoops and noops) ;) Now back to Linux defender of... oops that's Voltron :) On 4/1/06, John Stanton < [EMAIL

Re: [sqlite] last modified time or version of sqlite database

2006-04-04 Thread Chris Fletcher
Thanks for your suggestions :) Chris.

[sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread Roger Binns
I'd like to use sqlite3_enable_shared_cache in my APSW wrapper but I can't see a sensible safe way of doing it. The wrapper already enforces the conditions mentioned in the doc (all operations on a handle happening in the same thread). It looks like I'd have to do a lot of housekeeping