[sqlite] function of lemon and temp in Makefile?

2004-09-25 Thread Daniel=20W=FCrfel
While executing make install ./lemon and ./temp are exetuted. Can anybody tell me, 
what they do exactly?
Thanks,
Daniel

[EMAIL PROTECTED] build]# make install
sed -e s/--VERS--/`cat ./../VERSION`/ \
 .
.
.
gcc -g -O2 -o temp temp.c
./temp config.h 
echo config.h
rm -f temp.c temp
echo '/* Automatically generated file.  Do not edit */' opcodes.h
grep '^case OP_' ./../src/vdbe.c | \
  sed -e 's/://' | \
  awk '{printf #define %-30s %3d\n, $2, ++cnt}' opcodes.h
gcc -g -O2 -o lemon ./../tool/lemon.c
cp ./../tool/lempar.c .
cp ./../src/parse.y .
./lemon parse.y 
./libtool --mode=compile gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./../src 
-DNDEBUG -c ./../src/attach.c
.
.
.
_
Mit WEB.DE FreePhone? mit hochster Qualitat ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201



[sqlite] Index test on 3.0.7

2004-09-25 Thread Federico Granata
Hi, I'm testing index on sqlite ver 3.0.7.
I've create a really simple database 
CREATE TABLE tbl1(rowid integer primary key,fld1 text,fld2 integer);
and fill it with 100 row like this
insert into tbl1(fld1,fld2) values(blablablablablablabla,759928);

Then I copy this test.db to test-index.db and add a index (on test-index.db) 
CREATE INDEX ind1 on tbl1(fld2);

When I do something like 
time sqlite3 test.db select * from tbl1 where fld2=12345;  /dev/null

real0m3.879s
user0m3.188s
sys 0m0.650s

and
time sqlite3 test-index.db select * from tbl1 where fld2=12345;  /dev/null

real0m0.019s
user0m0.006s
sys 0m0.006s

I'm happy... index work very well...

but...
time sqlite3 test.db select * from tbl1 where fld212345;  /dev/null

real0m21.452s
user0m20.503s
sys 0m0.809s

and
time sqlite3 test-index.db select * from tbl1 where fld212345;  /dev/null

real1m15.840s
user0m54.799s
sys 0m16.131s

make me very sad :(

It's a bug or mine mistake ?

P.S. Sorry for my english.
 

 

 --

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 

 Sponsor:

 Dai più energia al tuo sport! Rigenera il tuo corpo in maniera naturale

* Grazie agli integratori sport che trovi solo su Erboristeria.com

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2379d=25-9


[sqlite] A problem with the select statement

2004-09-25 Thread Yogesh Marwaha
Hi!

I am using sqlite 3.05 beta. I have created a table containing a field named 'title'. 
When I run the SQL Command : -

select count(*) from master_table where title = title 

output is 885, i.e. count of all the rows in the table, whereas it should have 
returned the number of rows in which value of the field title is title (which is 
actually 10). Perhaps sqlite is comparing value of column named title with the column 
itself.

Can somebody please help, 

Yogesh M
Chandigarh, India
http://mylinuxapps.tripod.com

Re: [sqlite] A problem with the select statement

2004-09-25 Thread D. Richard Hipp
Yogesh Marwaha wrote:
 Hi!

 I am using sqlite 3.05 beta. I have created a table containing a field named
 'title'. When I run the SQL Command : -

 select count(*) from master_table where title = title

 output is 885, i.e. count of all the rows in the table, whereas it should
 have returned the number of rows in which value of the field title is title
 (which is actually 10). Perhaps sqlite is comparing value of column named
 title with the column itself.

A string in double-quotes resolves to the name of a column if such
a column is available.  Use single-quotes to force the string to
be interpreted as a string.
   SELECT count(*) FROM master_table
   WHERE title='title';
   ^ ^
   | |
 ' not  here -^-'
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


[sqlite] Speed comparison (was: [sqlite] Lock files....)

2004-09-25 Thread Hans-Juergen Taenzer
b.bum  ([EMAIL PROTECTED]) wrote:

  SQLite3 produces smaller data files

thats true,

  and is faster, in general, than did SQLite2.

but this is not my experience. In my small applications (about 20
records) inserting and searching with SQLite 3.0 is slower than SQLite 2.8
(about 25%). Therefore I stay with 2.8.

Hans-Jürgen