This is really a MySQL and php question since one of the two options
require programming. Of course I don't think the result would be
different in a different programming language.
I use lookup tables a lot. I have had between 5 to 10 lookup tables for
one table of data. Normally the lookup tables are small (much less
than 100 records) A few get close to 100 and very few go over 100.
Often times even with out using the lookup tables, the joins required to
get the data set I want can be complex on certain projects. So rather
than complicating it even more by doing even more joins to all the
lookup tables, what I have done on some projects is to read all the
lookup tables into a php array (which is really just a hash table in
php) then as I am iterating through my rows in the query and displaying
them for the user I just use my arrays to look up and display the data
on the web page. It only amounts to a few hundred fairly short strings
in a few arrays. Since the tables are small, mostly static, and the
queries simple, I would think they would stay in a query cache.
So my question is, is doing that way better than making the query more
complex with all the joins?
--
Chris W
KE5GIX
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
Ham Radio Repeater Database.
http://hrrdb.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]