On 3/9/09 22:25, "Adam Monsen" <[email protected]> wrote:

>> I am confused. So, there should be no hard-coding. Right? Either ID or
>> name will be a variable or defined in a configuration table or file.
> 
> I think Ryan is wondering about hard-coding the FREQUENCY_PAYMENT_ID of
> 2. This is generally a bad idea for reasons I probably won't get right,
> but I think it has something to do with the need to sometimes change
> primary keys.
> 
> I'd say it is better to hard-code the LOOKUP_NAME, since that symbolic
> name for the FREQUENCY_PAYMENT_ID is less likely to change.

That's exactly it, so other than the spelling issue, that was my take on it
(or what I felt was the right answer).  Is that why we have the abstraction
of the lookup_value table at the moment?

>> Performance wise, you would want to go the ID which should be unique
>> and indexed.
> 
> I agree. But I think the difference is going to be negligible in this
> case.
> 
> I'm pretty rusty on SQL performance tuning, but using MySQL's EXPLAIN to
> profile the queries shows that all lookups are index-based in both
> cases. I believe that means that they will scale similarly to large
> tables.

Ahh! Thanks for that tip Adam, I forgot to make sure to take a look at the
indexes and using EXPLAIN.

Cheers
Ryan
-- 
Ryan Whitney  
Mifos Technical Program Manager
[email protected]
Mifos - Technology that Empowers Microfinance (www.mifos.org) 


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mifos-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-users

Reply via email to