I have a problem with BLOB writing. I need to write
some binary stream into sqlite table. As I understood, incremental
BLOB I/O requires space of constant size to be preallocated
with zeroblob, but I don't know the size of stream in advance.
And sqlite doesn't allow to change the size of BLOB
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
??? wrote:
> As I understood, incremental
> BLOB I/O requires space of constant size to be preallocated
> with zeroblob,
That is correct.
> but I don't know the size of stream in advance.
Then you can't use the incremental I/O for
On Oct 31, 2008, at 6:34 PM, Zbigniew Baniewski wrote:
> I would to make automatic test of the database integrity each time
> before
> accessing, just to avoid the problems with broken files, which are
> resulting
> in error message: "database disk image is malformed".
>
> Unfortunately,
> The problem is with bulk-updating:
>
> > # time sqlite3 kfzdb 'update kfz set musttrans=3'
What happens when you run the update inside a transaction?
___
sqlite-users mailing list
sqlite-users@sqlite.org
On Fri, Oct 31, 2008 at 06:43:29PM +0700, Dan wrote:
> You could use "PRAGMA quick_check", which is similar to integrity_check
> but runs more quickly.
Yes, it's much faster - but still much too time-consuming to make it
default (more than 10 additional seconds on ~300 MB database file).
> Note
Hi,
is there a way to get the size of a :memory: db in the sqlite3.exe
command line interpreter?
Or any other way?
--
Christophe Leske
www.multimedial.de - [EMAIL PROTECTED]
http://www.linkedin.com/in/multimedial
Lessingstr. 5 - 40227 Duesseldorf - Germany
0211 261 32 12 - 0177 249 70 31
> is there a way to get the size of a :memory: db in the sqlite3.exe
> command line interpreter?
> Or any other way?
>
Also, would using a small PRAGMA page_size value decrease the amount of
memory used?
I think the default size is 4096 bytes, how about 512 bytes for an
in-memory database
Hi,
I have tried converting a program from a homebrew "database" to sqlite3
for easier maintenance and hopefully better performance. While the
former is easily achieved, the performance is not making me happy. The
system is a "semi-embedded" small form-factor x86 machine with 128MB of
RAM
Hi,
> Considering that all or most of the records have the same value in
> musttrans column, do you really need an index on it? Try dropping the
> index, see if it helps.
They have the same value in my test. In the real application that field
is used as a status field and most of the records
Marian Aldenhoevel <[EMAIL PROTECTED]> writes:
>
> Hi,
>
> I have tried converting a program from a homebrew "database" to sqlite3
> for easier maintenance and hopefully better performance. While the
> former is easily achieved, the performance is not making me happy. The
> system is a
"Marian Aldenhoevel"
<[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> CREATE INDEX IF NOT EXISTS IDX_KFZ_MUSTRANS ON KFZ (mustTrans);
>
> The problem is with bulk-updating:
>
>> # time sqlite3 kfzdb 'update kfz set musttrans=3'
>> real10m 7.75s
>> user8m 49.73s
>> sys 0m
> > What happens when you run the update inside a transaction?
> I tried it like this:
> > time sqlite3 kfzdb 'begin ; update kfz set musttrans=5 ; end'
> No significant change in runtime either.
Are you able to benchmark it using an actual PC's local hard drive?
Just for comparison. To be
I would to make automatic test of the database integrity each time before
accessing, just to avoid the problems with broken files, which are resulting
in error message: "database disk image is malformed".
Unfortunately, "PRAGMA integrity_check" takes very long time. Does there
exist any
Hi,
> Are you able to benchmark it using an actual PC's local hard drive?
> Just for comparison. To be fair, you'd have to use the same build of
> sqlite, or at one that was built the same way.
That would be quite an effort.
For a quick data-point I copied the database file to my
Marian Aldenhoevel wrote:
> Hi,
>
>
>> Are you able to benchmark it using an actual PC's local hard drive?
>> Just for comparison. To be fair, you'd have to use the same build of
>> sqlite, or at one that was built the same way.
>>
>
> That would be quite an effort.
>
> For a quick
You canot have constant time inserts into a B-Tree because of the
inherent nature of the algorithm. Berkeley DB has either B-Tree or
hashed indices. The unordered hashed indices are possibly what you
measured. Note that B-Trees have the additional property that they
maintain an order and
Hi,
> FWIW, I ran your simple example on a Windows XP machine through the Ruby
> driver and got 8 seconds for the update.
Scaling that down to the hardware being used, which is a 486-clone with
a 16bit bus showing as running at 31 BogoMIPS in linux (don't know the
clockspeed), propably kills
>> Are you able to benchmark it using an actual PC's local hard drive?
>> Just for comparison. To be fair, you'd have to use the same build of
>> sqlite, or at one that was built the same way.
>
> That would be quite an effort.
Just a thought. Since the build for your device is likely to be
It does not look like you are using transactions.
Marian Aldenhoevel wrote:
> Hi,
>
> I have tried converting a program from a homebrew "database" to sqlite3
> for easier maintenance and hopefully better performance. While the
> former is easily achieved, the performance is not making me
Marian Aldenhövel wrote:
> Hi,
>
>
>> FWIW, I ran your simple example on a Windows XP machine through the Ruby
>> driver and got 8 seconds for the update.
>>
>
> Scaling that down to the hardware being used, which is a 486-clone with
> a 16bit bus showing as running at 31 BogoMIPS in
Hi all,
I create a table like this "create table tbl1 (ID integer primary
key, name, addr)" ,
then insert a record:
"insert into tbl1 values(1, 'aa', 'bb')",
select the record:
"select * from tbl1 where name ='aa' " ,can get this record :
(1, 'aa',
On Fri, Oct 31, 2008 at 9:06 AM, yoky <[EMAIL PROTECTED]> wrote:
> Hi all,
>I create a table like this "create table tbl1 (ID integer primary
> key, name, addr)" ,
>then insert a record:
> "insert into tbl1 values(1, 'aa', 'bb')",
> select the record:
>
Since you just use one table you have no compelling reason to use a DB
and could use a simple index file. I would expect your update of
300,000 records in that case to only take a few seconds. The footprint
would also be far less. Something like D-ISAM would do the job.
Note that you would
Hello,
I am writing a program using SQLite that uses two threads performing the
following operations in an infinite loop:
- Thread 1 inserts 500 records to the database every 30 seconds and then
goes to sleep. (I prepare an insert statement, BEGIN TRANSACTION, bind
values, step through the
dbikash <[EMAIL PROTECTED]> writes:
>
>
> Hello,
> ...
> - Thread 1 inserts 500 records to the database every 30 seconds and then
> goes to sleep. (I prepare an insert statement, BEGIN TRANSACTION, bind
> values, step through the statement, reset the statement, and do END
> TRANSACTION)
>
I prepare the statement once. But I use transaction for every bunch of 500
record inserts.
mikewhit wrote:
>
> dbikash <[EMAIL PROTECTED]> writes:
>
>>
>>
>> Hello,
>> ...
>> - Thread 1 inserts 500 records to the database every 30 seconds and then
>> goes to sleep. (I prepare an insert
On Oct 31, 2008, at 9:46 AM, dbikash wrote:
>
> I get a SQLite error 1 (SQL logic error
> or missing database). What could be the problem?
Is that the error message text that SQLite returns: "SQL logic error
or missing database"? Or is that just the meaning of SQLITE_ERROR
that you looked
Hello all,
I was just curious if there is a way to convert an integer representation of
an IP address that I store in my DB, to it's string equivalent
(xxx.xxx.xxx.xxx)? I would also need to convert it to host-byte order as
well.
Thanks,
J
___
Jonathon <[EMAIL PROTECTED]> wrote:
> I was just curious if there is a way to convert an integer
> representation of an IP address that I store in my DB, to it's string
> equivalent (xxx.xxx.xxx.xxx)? I would also need to convert it to
> host-byte order as well.
select (ip >> 24) || '.' || ((ip
I use both int sqlite3_errcode() and sqlite3_errmsg(). Here is what they
return (I get 3 different types of errors in different runs):
1, SQL logic error or missing database.
1, unrecognized token "" (there's a non printable character like a rectangle
within the quotes).
1, SQL logic error or
Hi,
Is there any function or sql command that
allows me to check which tables has a table
and what are the constraints to those
columns?
Thanks,
Maurício
___
sqlite-users mailing list
sqlite-users@sqlite.org
I think you should consider running the program with one thread at a time.
This will help you isolate if this is a problem within a thread or is an
interaction among the threads.
I'll assume its both. After you fix all of the localized issues.
I'd suggest recompiling sqlite with thread safe
Hello Mauricio,
i do not understand your question. Perhaps you will want to rephrase it.
The table "sqlite_master" can tell you how the tables were created. See
http://www.sqlite.org/sqlite.html or http://www.sqlite.org/faq.html, and
search for "sqlite_master".
Martin
Mauricio wrote:
> Hi,
>
(I should have said "which tables has
a database"... Sorry.)
Suppose I've created a table with
create table mytable (id unique, somethingelse)
Is it possible somehow to check after reopening
the database that mytable 'id' column was created
with the 'unique' constraint? I want to use that
to
> I have the DevKit and all the goodies and am able to make the DS jump
> though
> hoops. But I always have trouble with SQLite. I'm one of those who gets
> the
> very irritating huge numbers of compile errors that have something to
> do with
> compiler version versus SQLite version versus header
> I have a problem with BLOB writing. I need to write
> some binary stream into sqlite table. As I understood, incremental
> BLOB I/O requires space of constant size to be preallocated
> with zeroblob, but I don't know the size of stream in advance.
> And sqlite doesn't allow to change the size of
"Mauricio" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> Suppose I've created a table with
>
> create table mytable (id unique, somethingelse)
>
> Is it possible somehow to check after reopening
> the database that mytable 'id' column was created
> with the 'unique' constraint? I
> Hi all,
>I create a table like this "create table tbl1 (ID integer primary
> key, name, addr)" ,
>then insert a record:
> "insert into tbl1 values(1, 'aa', 'bb')",
> select the record:
> "select * from tbl1 where name ='aa' " ,can get this record :
>
38 matches
Mail list logo