From: Stefan K. <ste...@un...> - 2006-01-02 13:59:31
|
Am Friday 30 December 2005 23:59 schrieb Ola Spjuth: > On Fri, 2005-12-30 at 15:34, Christoph Steinbeck wrote: > > You need some way of in-memory presreening for fast substructure > > searching. And this cannot be done efficiently with SQL functions. > > In NMRShiftDB, we do this with fingerprints stored in a special buffe= red > > MySQL table, which is searched by a MySQL UDF, which does the bitstri= ng > > comparison on the fingerprints. > > Stefan, do I remember correctly that this can be done in a fraction o= f a > > second? > > > > Of course, one can do this by reading the fingerprints from the datab= ase > > into memory (at startup and then every now and then updated by a cron > > job) and doing the fingerprint screening with regular java. That shou= ld > > work equally well. > > How long does it take to read a reasonable-sized table of fingerprints > stored as bit-strings into memory? How long does the actual comparison > take (in java, not UDF)? Just curious... Hard to say. A select for the fingerprints on 15000 nmrshiftdb rows takes= half=20 a second. Not sure if this would take longer via jdbc. Never tried the=20 comparision in java, so I can't say how long it takes. Stefan > > Cheers, > > .../Ola --=20 Stefan Kuhn M. A. Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Z=C3=BClpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7428 Fax: +49 (0) 221-470-7786 My public PGP key is available at http://pgp.mit.edu |