Re: DBA: A math question for you :-)
Posted in 1996
Tim writes about the SQL Tutorial manual... >datrows = min(255,floor(pageuse/homerow)) ; > >I found the floor and ceiling functions but the "min" is >conspicuously absent. I'm not a math major, so the usage >escapes me. The HP/UX machine doesn't seem to have it either. >And the documentation is not clear what the function is >trying to provide, but that's beside the point. :-) > >Is there a math formula that would better express this, or >does someone have this min() function? And is this stuff >different for 7.x? Is the min thing even needed? Ask and you shall receive! (Despite what Kerry says...) You are working too hard on this one. The "min" and "max" functions are meant to return the "lesser of" or "larger of" two values. In the case of datrows, that function can be pronounced as: the lesser of (255 or floor...) In other words, "whichever is smaller." In the version I have of the 7.2 documentation (The December 1995 printing, which is not the newest, I know) the chapter on "Tuning the Model" has been deleted entirely from the SQL Tutorial. Problem solved! Oh, you want to know how to size a table? That's in another book: Informix-OnLine Dynamic Server Performance Guide Version 7.2, December 1995, part no. 000-7891 (You want the one from ~April 1996, though) The chapter is called "Table Placement, Layout, and Fragmentation" and it has a completely re-written algorithm for estimating data pages. The new, very English-like text has no mention of the "floor", "ceil", "min" or "max" functions, and is now nearly 3 pages long. It is meant to be very verbose and clear. I have not worked through the formula myself. YMMV. Good luck, ______________________________________________________ Clem Akins (aka clema@informix.com) Informix Software, Inc (Standard disclaimers apply) International Technical Support Last seen: back in Menlo Park, California