Re: PLEASE explain "page size" to Desperate Informix Newbie
Posted in 1994
Topics: Data Types & Schema Design
Andy Kent (akent@cix.compulink.co.uk) wrote: : > IS IT TRUE THAT A RECORD WILL EAT AN ENTIRE PAGE IF : > IT IS GREATER THAN HALF THE SIZE OF THE PAGE???? : Unless it contains some VARCHAR datatypes, yes. If the row size is less : than the page size, the whole thing has to be able to fit on the same : page. The original posting said that the MAX size was ~ 1250 bytes. I would assume that means there is some variable length data. If there is no variable length data (varchar, etc), it's size must be considered 'fixed' and therefore, if the size is > 1/2 page, only one row per page, you are correct. : With a row size like that, and provided you've got OnLine, you should : consider replacing at least some of the CHAR datatypes with VARCHAR. You : would also find yourself storing a lot less blank space. The problem with VARCHAR is with garbage collection. I believe that if a row with VARCHAR data changes size and is larger, the row will be written to the next available page location (that is large enough to accomodate it.) The engine will not do a good job of reusing that vacated space. With a size of 1250 bytes, I would consider further normalization before I could consider using VARCHAR. That is, unless the volatility of the information in that table is low. I.e. it does not matter if the engine does poor garbage collection if it never (infrequently) needs to collect garbage. If the volatility is low, with infrequent updates, I agree with the VARCHAR suggestion. DCT -- @ David Tomlinson @ @ dtomlnsn@netcom.com @ @ "By day fantastic birds flew through the petrified forest, and @ @ jeweled crocodiles glittered like heraldic salamanders on the @ @ banks of the crystalline river. By night the illuminated man @ @ raced among the trees, his arms like golden cartwheels, his @ @ head like a spectral crown...." @