Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am currently storing data in fields as shown below. Each of these pricing fields has two database rows associated with it, and there is up to 24 of these tables for a house. This therefore means that in the worst case, a house has 1,440 rows of prices associated with it.

Is this going to lead to a much slower load time for a page, if all this data needs to be loaded to create a page? When doing an availability search for a long time in the future (so worst case), this data needs to be potentially loaded for all houses so that is up to 80,000 rows that need to be loaded.

I did think that it might be better practice to store this in a serialized format, where 1,440 would be reduced to 48 rows per house. Is this a good idea?

enter image description here

share|improve this question
1  
It would be very, very interesting to know what sort of database engine do you use. And for clarification, a scheme how data you presented here should be transformed (like before/after). –  dezso Nov 15 '12 at 11:57
    
Why is the pricing information spread across two rows each with 30 columns in up to 24 different tables? The two rows is particularly interesting. Are the columns different for each of the 24 tables? –  Leigh Riffel Nov 15 '12 at 13:37
    
It relates the type of data stored in the field to the data. So, in the first row it states the value, and the second row it states the type of value (so a rate). These are stored within a meta_data table. –  Ollie Nov 15 '12 at 14:05
    
Rate information should not be stored in a separate row from the value it relates to; it should instead be in another column in the same row or if possible normalized to the same rate. Yes, 60 columns would be better than 30 columns in two rows. –  Leigh Riffel Nov 15 '12 at 16:08
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.