So I kind of consider myself knowledgeable in the DB arena... What is the query use case where we are doing a lookup on the hash of a user agent?
So I generally optimize my data around the queries. In this case, I only see us querying individual rows by their unique id (auto generated integer) and maybe by its state and who its assigned to. The actual user agent string is just metadata... no? ________________________________ From: eberhard speer jr. <[email protected]> To: [email protected] Sent: Wednesday, March 27, 2013 10:02 AM Subject: User Agent table -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, With you regard to the User Agent table : if your database supports GUIDs you can use that to implement Carlos' idea : MD5 is 16 byte (128 bit) so you can easily convert it to a GUID. Regards, esjr > Hi, > > If I could suggest a small change in order to make a better index > on that table. I made a similar table at one point, but for faster > lookups I… (I know I'm about to be butchered)… I hashed the UA > string…. using md5 no less, but I must say that +500K devices later > I haven't had a single problem. Also, it would be a good idea to > add a column that points to the device's information source (in my > case it was WURFL/UAProf). > > Good stuff on this thread. > > Regards, > > -- Carlos D'Agostino -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRUvwMAAoJEOxywXcFLKYcK8YIAKNzPONJql0OVF/WIRq5MJuc iXNo09CDv3tVpVEclnh6zobtwoFfXwiuoNsMl2+uVgAkxVeoZKQJjzmNrMfW4hDx SbG33s/mTocSa6GrLtmZey9C1ivfS7cB5UQanSWCWLZ/gUqgmgUwIfdT+UDMAkU7 FM43P3zBdIKQfwK8P7eSwarKoINrn2irUuMU2NawHv8H1ZepiHydWWkHsmKQDz6Q QVoKkzsRqmys3GeZzc8BAgIHBA73m35BjY5Rt1Q3jm6D/kuXB1+2AVr/nftNL149 2fhizeDfBBblOXWboCnSYCAXYiiUK/iOfOZmGENb2b5ahAszqqAqYQmEkCTiPoU= =6oFf -----END PGP SIGNATURE-----
