Best practices suck!
I know, it’s a little bit of an aggressive statement, but if you think about it, it gets to you… Regarding performance and “best practices”. Let’s do this, a little bit, on a Cary Millsap kind of way…
Let’s say, you are in Dallas (or somewhere else…) and your want to call your wife (/ girlfriend or vice versa or one of the variations, that are possible) on a different continent. Do you know how he or she will react? Do you know for sure, what his or her, first reaction, on the phone, will be?.
Performance and all, what if…
Is there a way to predict this? In my case, her first reaction could be one of happiness or sadness or anything else, it depends on various variables, I can not control.
Let’s say, that there will only be one of two outcomes: she is or happy or sad to receive my telephone call.
This outcome (sadness/happiness) depends on factors like: the weather in Holland, if she misses me, her situation at work, the feeling she got from drinking coffee with a neighbor, how my daughter behaved during the day, the amount of traffic she had to endure going from and to work, if she feels sick because of the the flu, if she got a good night sleep, etc, etc, etc…
All those variables have a more or less impact on how her first reaction will be.
Is it possible to calculate or formulate a “best practice” in this case?. I don’t think so. I could try to investigate, via the internet, to make absolutely sure that the weather is great in Holland, so I would have a gut feeling that the possibility of getting a “happy” response will be very likely, but then again, do you know the chance on this happening in Holland
In my honest opinion, as Piet Visser said it during his presentation, all databases are unique (even across the universe). I think that holds ground if you look upon all the variables and settings possible that have an effect on database performance or a SQL statement that is fired against the database in a certain point of time.
Databases and the systems they live on, are made by people, to serve people. So there is a lot of “human factor” variables in these systems and of course other factors, you really can’t (always) control, like the temperature in the server room, that has an effect on performance regarding, for instance, hard disk data throughput.
You could get the human factor out there, but still you probably could not absolutely predict performance. Regarding setting up an “non human” system; what sense would that make anyway? Databases and systems they live in, where made for human purposes and not the other way around. A business depends, among other things, on a database; The database was not invented so I would drive the business.
The internet factor
Nowadays, with the internet in place, a lot of people are searching for shortcuts, so they tend so seek for “best practices”. What they, in my honest opinion, do not see, is that there are no real good “best practices”, there is no general rule. It depends. At utmost you should use “rules of thumb” as long as they serve their purpose and you, in your case, should abandon them when they don’t fit any more. Maybe that is why you won’t find them here presented on Hotsos. What is presented on Hotsos are use cases where in that particular case a “best practice” fitted. They present a state of mind, how to deal with problems, and how it could make sense. The context is driven by a good understanding of all variables and knowing their architecture (the concepts). There is no “best practices” method presented here, the is no shortcut…
On Oracle Open World, last year, a presenter ended up with a statement to the audience that he didn’t like the SESSION_CACHED_CURSORS parameter. He based this remark on the very bad experiences he had with this parameter on a Oracle 8 database. That’s also one of my points, why I don’t like best practices, because they are time constrained. That what is true now, will not always be true next year or in the following database version.
The really bad thing about best practices, is that people tend to stop thinking. Stop thinking about what they are trying to do or to achieve, in his or her case. The “Best Practice” applied in that particular case, will only hold for a small period of time.
Better understanding and “it depends…”
I really start to hate that sentence: “it depends”. What we humble humans want is control. When understanding kicks in, those nice “gadgets”, like OEM, statspack (doesn’t help with skew data, for example) or profilers like method R, won’t always help you or give you “the” best practice regarding performance solutions. If you are unlucky, they will also point you in the wrong direction, if in a correct direction at all… What they can do, when using more of them for instance, is that they can direct you to a solution, but only if you know the context (what, where and how they do it) in the environment (what, where, how) they presented you data with. So you also know, for instance, to use a different tool, if they other one, is not appropriate anymore.
The optimizer is also just a “best practice” process. It will present you with the optimal way of getting data, in most cases. If you are unlucky, because of human interaction, wrong architecture, skew data, wrong statistics, etc, etc, you will or have to make the environment more optimal for the optimizer or you will have to use hints (do you know how many hints there are nowadays?). There will be, nevertheless, no guarantee that it will work in the next database version, in the next situation…
The people at Hotsos
I have been lucky.
In the days I started, roundabout Oracle 7.0 (1992), there was no internet, so my best buddy was (and still is) the “Oracle Concepts Guide”. There were no shortcuts I could use and it forced me to learn from the ground up, trying to understand all the structures and processes involved that applied to my database. To understand the overall architecture really helps. It took me a lot of time, frustration and effort to get me a better understanding of the overall process. And a database is never standing on it’s own, is my belief, so from a DBA point of view, you also have to understand the business needs, the user point of view, the developer and every process or architecture that makes use of your database.
There are approximately 450 (DBA) people currently visiting the presentations here at Hotsos. I feel very lucky to see the presentations and have the chance to interact with those people. Being 41 years old and “only” 12, 15 years of being involved in the IT sector; I still feel “young” and humble amongst those veterans. If I think about it, most of those guys and girls probably didn’t even had the Concepts Guide…
The most profit I got here, is to exchange ideas or general methods, of how to deal with (performance) IT problems. The people presenting during Hotsos and others, are all very keen to help or to find a solution, and in this way we learn from each other. Remarks heard here, is stuff like, “it is great that someone is even want to hear my remarks, my ideas”. “At home, I would try to explain the concepts and how this would help, but apparently it is not interesting enough or it doesn’t apply to them.”. Grumpy old men and women? So it is a gathering of grumpy old men and women? Maybe, but they still got the energy to pass their experiences on and that should count for something. Anyway, I liked the BBC series, and amongst others, it make me laugh and put it all into perspective again.
To wrap it up
To wrap it up…the answer is 42 (as always).
I also still have to figure out though, what the question was…
All in all I still have to learn a lot, so there is hope for me. Who knows, at a certain point in time, I will grasp it (for that time period).
Images from some of the presenters
- Enhancements for JHeadstart Generator/Consolidation of best practices
- Worst practices when using Oracle JDBC Drivers – great presentation by Douglas Surber
- Struts best practices – white paper on JavaWorld
- The Bible for ADF Developers – Best Practices, Guidelines, How-to's: the works!
- Rule based in Oracle 10g