Re: [sqlite] Encoding Question

2011-05-31 Thread Christian Schwarz
This is base64.

Christian
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite profiler

2009-09-23 Thread Christian Schwarz
> Maybe, what is it?

http://en.wikipedia.org/wiki/Profiling_(computer_programming)

Cheers, Christian
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


AW: [sqlite] Transaction journal corrupted by antivirus

2007-05-03 Thread Christian Schwarz
> The problem is my application is used by thousand of customers.
> I cannot ask them to tweak their antivirus.

Why don't you encrypt the message content before storing?

Christian

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



AW: [sqlite] Still getting "Insertion failed because database isfull." errors

2007-04-18 Thread Christian Schwarz
> the database residing on removable media.  When the system returns,
the
> "pointer" to the media is not guaranteed to work again.  In other
words,

The file handle remains perfectly valid when the media has not been
removed or changed. Besides, I've observed that sometimes the media is
not accessible at all after an application was trying to use one of the
open file handles while the media is being remounted. Maybe that's just
a sign for a poorly written driver and thus device dependent...

Greetings, Christian

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



AW: [sqlite] Still getting "Insertion failed because database is full." errors

2007-04-18 Thread Christian Schwarz
Hello Joel!

We were faced with similar problems in the field, too. Those were more
general ones with PCMCIA/CF/SD cards.

The reason was that the mobile devices (different device types with
Windows CE 4.1 and 5.0) doesn't handle the access to removable media
gracefully when the device is going to suspend and resuming from
suspend.

We had to learn (the hard way) that it's an application's task to block
*any* file (reading and writing) access before the device is going to
suspend until the time the device resumed from suspend *and* the
removable media has been successfully remounted. The remount process can
take up to 5-10 seconds!

If your application doesn't handle those cases well you'll run into
problems. Typically, you will see that kind of problems only in the
field and not when doing in-house tests...

Greetings, Christian

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



AW: [sqlite] Obtaining randomness on win32

2007-01-29 Thread Christian Schwarz
> randomness as you need.  But I do not know how to do this on
> win32 and wince.  The current implementation seeds the random

As Michael already suggested, you should use the CryptoAPI
(CryptAquireContext, CryptGenRandom). This API is supported by all 32
bit desktop versions and by Windows CE starting with version 2.10.

Christian

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



AW: [sqlite] Bad performance with large joins?

2006-03-24 Thread Christian Schwarz
> >> > Have you tried creating indexes on your rows.
> >> > [..]
> >> > I suggest you add indexes on text_val
> >>
> >> Yes. I use
> >>
> >>   create index text_val_idx on geodb_textdata(text_val);
> >>
> >
> > This index seems pretty useless. You're querying against
> > geodb_textdata.loc_id and geodb_textdata.text_type. So you should
create
> > an index over these columns.
>
> Practically one such line for each table and each column.

Why on each column?

> If you want to see the whole db as import script, have a look at
>
>   http://renormalist.net/opengeodb/opengeodb-sqlite.sql.gz
>

I suggest analyzing your queries and creating only those indexes that
are really needed. There's no need, and it's surely a bad practice, to
create an index for each and every column.

For example, when your where-clause contains columns A, B and C (in this
order) you should create *one* index on A, B and C. Separate indexes on
column A, B and C are not that useful. In this case, SQLite would most
probably use the separate index on column A.

Greetings, Christian


AW: [sqlite] Bad performance with large joins?

2006-03-24 Thread Christian Schwarz
> > Have you tried creating indexes on your rows.
> > [..]
> > I suggest you add indexes on text_val
>
> Yes. I use
>
>   create index text_val_idx on geodb_textdata(text_val);
>

This index seems pretty useless. You're querying against
geodb_textdata.loc_id and geodb_textdata.text_type. So you should create
an index over these columns.

Greetings, Christian


AW: [sqlite] Views over multiple tables and conditional selection (ticket #1134)

2005-10-13 Thread Christian Schwarz
> Us an "AS" clause on each result column of the view in order to
> assign the specific name you want to that column.

That works. Many thanks!

Regards, Christian


[sqlite] Views over multiple tables and conditional selection (ticket #1134)

2005-10-13 Thread Christian Schwarz
Hello!

We're getting a "no such column" SQL error executing conditional select
statements using this view:

CREATE VIEW ENTF as select ENTF1.new_key, ENTF1.tp_id_start,
ENTF1.tp_id_ziel, ENTF2.weg_id, ENTF2.weg_rel_nr from ENTF1, ENTF2 where
ENTF1.keyentf2 = ENTF2.keyentf2;

These are the tables the view is using:

CREATE TABLE ENTF1 (new_key integer, tp_id_start integer, tp_id_ziel
integer, keyentf2 integer);
CREATE TABLE ENTF2 (keyentf2 integer primary key, weg_id integer,
weg_rel_nr integer);

Further investigations revealed that ticket #1134 is describing this
problem. Is there any chance to work around this problem (of course
except not using views)? Is this issue going to be solved in the near
future?

Regards, Christian


AW: [sqlite] bug in ORDER BY ?

2005-04-14 Thread Christian Schwarz

Does "select * from mactor order by id desc limit 1" and
"select * from mactor order by id limit 1" not work?

Greetings, Christian


[sqlite] index not used?

2004-12-12 Thread Christian Schwarz
Hello,
 
I've a pretty big table (between 800.000 and 900.000 rows) with the 
following schema:
 
create table relations (rel_id_from integer, rel_id_to integer, 
id_old integer, id_new integer, valid_from integer, valid_to integer);
 
create index idx_relations_idx0 on relations (valid_from, valid_to, 
rel_id_from, rel_id_to);
 
The "idx_relations_idx0" index should speed up queries which select 
a relation between 2 points (rel_id_from and rel_id_to) and which is 
valid at a particular date (valid_from and valid_to). Both columns, 
valid_from and valid_to, hold the number of days elapsed since 
01.01.1970 or so.
 
Normally, a select-statement would look like this (where 1 is 
the current day):
 
select * from relations where valid_from < 1 and valid_to > 1 
and rel_id_from = 78 and rel_id_to = 9120;
 
This kind of statement is slow (takes between 3 and 4 seconds). It seems 
that sqlite is doing a full table-scan.
 
For testing purposes, I've executed the following statement using fixed 
(and existing) values for valid_from and valid_to:
 
select * from relations where valid_from = 9003 and valid_to = 43020 
and rel_id_from = 78 and rel_id_to = 9120;
 
This statement executed within a few milliseconds but is of course of 
no use.
 
So, could anyone make a suggestion how to speed up my query? How to 
speed up queries using "<" and ">"?
 
Greetings, Christian