Re: [PyWrapper-devel] Binary key fields in TAPIR
Status: Alpha
Brought to you by:
jatorre
From: Dring, M. <m.d...@BG...> - 2007-06-20 13:45:32
|
Well,m to be honest Ive never tried that. If you experience a problem then there might be one. What does the sql logging say? And what happens if you execute the exact sql directly? Am 20.06.2007 11:55 Uhr schrieb "Skofic A. Milko (Bioversity - HQ)" unter <m.s...@cg...>: > I was trying to understand why the models I was testing don't work > and I fell into a possible problem (which still does not answer my > previous problem): > > In my databases I like to use binary strings formed by hashing a > series of significant fields of the table. Normally you get a 32 > hexadecimal string (if you use the MD5 MySQL function or the old md5 > () function in PHP), but when you have more than 1 million records it > is nice to reduce the size of the key, so I use the PHP function that > creates the same hash as a 16 character binary string, which I use in > the database. When trying queries I noticed that if I use an ASCII > string as the primary key TAPIR at least performs the query, if I use > the binary string it does not even do the query: is there a problem > using binary fields as primary keys? > > Thanks > > Milko |