Simon Slavin schrieb:
> On 26 Nov 2009, at 2:50pm, Thomas Lenders wrote:
>
>   
>> I am looking for an exact match as in I need to know if a number exists 
>> in the table or not.
>> Something like "select count(*) from ART where artnr='0123456789'".
>>
>> I could store the data in a text file instead but then I would have to 
>> search in the textfile on "disk", eg. a binary search algorithm or 
>> something.
>> I cannot just load the textfile into memory because in this case, the 
>> storage space on "disk" and the available memory actually come from
>> the same pool I would still have to store the data twice.
>>     
>
> Okay, you have established that you should be using SQLite and yes, you do 
> need to index that column.  But you have also established that you must not 
> define your column as a number.  The following
>
> 0123456789
>
> is not a number.  The leading zero means that it must be stored as text.  If 
> you need to store such things then define your column as TEXT.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   

You are right, the data is actually in TEXT format and I *should* store 
it that way, however the discussion came about from a suggestion here to 
convert it
to INTEGER for faster searching. By now I have converted the values to 
not include leading zeroes or quotes and imported them again.

I was really shocked to see exatly the same thing as before.

However, it seems to be a bug in the admin tool I was using to look at 
the data rather than an error in SQLite itself ! Because if I
select * from ART where artnr > 4294967296 I do get a lot of results but 
they are displayed (in sqliteadmin) as being '0'.

So, thanks for all the answers - I think I have the original problem 
solved by now.. I will just split the data into multiple tables and not 
use an
index. Seems to be fast enough and solves the speed problem.


-- 

Freundliche Grüße aus Bad Vilbel
 
LaserIDENT GmbH
Industriestrasse 10
 
Thomas Lenders 
Software Entwicklung

61118 Bad Vilbel
Tel.: 0 61 01 /9 81 8 -32
Fax.:0 61 01 /9 81 8 -77
email: t.lend...@laserident.de 


Besuchen Sie uns im Internet unter www.laserident.de oder senden Sie uns eine 
eMail an i...@laserident.de
 
LaserIDENT GmbH, Industriestr. 10, 61118 Bad Vilbel, Geschäftsführer: Herr 
Christian Röhl
AG Frankfurt/M, HRB 76540, Steuernr.: 02023841721, UstID: DE-203373179 


Diese E-Mail und etwa anhängende Dateien enthalten vertrauliche Informationen 
und sind ausschließlich für den Adressaten bestimmt.
Sollten Sie diese E-Mail irrtümlich erhalten haben, informieren Sie uns 
hierüber bitte unter i...@laserident.de oder unter der oben angegebenen 
Telefonnummer, 
und löschen Sie diese E-Mail einschließlich etwa angehängter Dateien aus Ihrem 
System.
Bitte beachten Sie, dass die Weitergabe, Kopie und sonstige unautorisierte 
Nutzung der E-Mail und etwa angehängter Dateien verboten
sind. Vielen Dank.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are adressed.
If you have received this e-mail in error please notify i...@laserident.de or 
contact him under the phone number specified above and delete this e-mail 
including attachments from your system.
Please note that any unauthorised review, copying, disclosing or other use 
whatsoever are prohibited. Thank you.


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

Reply via email to