Where in the world part II
A talk about talks and an opportunity to guess where in the world I was last Friday.
First for the guessing:
You can click on that to see larger images if you like, but can you guess where that windowless building is and what it is used for? Talk about a special purpose building. I thought it was interesting. I had heard of it before I went to this location, and the sales rep that was with me thought I was really smart when I looked at it and said “oh, is that the such and such building that they use to do …”. He said most people just look at it and say “what the heck is that for, must be the NSA or CIA or something and they don’t want us to see them”.
Anyway, I did a mini seminar yesterday with three of my favorite topics.
Topic 1, Things you know. I need to update this one and have lots of good ideas for the future. The main themes of the presentation are
- Question Authority, especially ones like me that say “I have 17 years of Oracle experience”. That generally means we still remember how it used to work in version 5. Not relevant in the year 2005. Be wary of the “I have decades of experience, just trust me”. Make us show you.
- It ain’t so much what you don’t know that hurts you, it is what you know that just ain’t so. I add to that, it is what you know that just ain’t so, just ain’t always so, or just ain’t so anymore.
It is sort of a fun presentation, hopefully for the audience as well as me. The main goal – to make you think, not so much to teach you anything about Oracle, although I do cover a couple of myths, things we know that just ain’t so, ain’t so anymore or ain’t so all of the time. That is the problem I have with rules of thumb, they just ain’t always so. And you cannot apply them to a broad category of similar problems.
Consider this rule of thumb: Before you go grocery shopping, you should fill up, eat something. That will prevent impulse buying of cookies and such. Sounds like a great rule of thumb. Let’s generalize that – to the liquor store. Uh oh. Not so sure you want to fill up on liquor before going to the liquor store.
Topic 2, Efficient Schemas. This one is based on chapter 7 of Effective Oracle by Design. What I’d like to do someday soon is some a session for each chapter in that book — Effective SQL, Effective PL/SQL, and so on. Anyway, Efficient Schemas walks through some of the overlooked features of the Oracle database from a physical implementation perspective. I talk about simple things like using the right data type and why using a string or number to store a date is a horribly bad idea – the optimizer knows that between the DATES 31–Dec-2004 and 01–Jan-2005, there is just “one date”. But between the string/numbers 20041231 and 20050101 there are lots of other strings or numbers. It can get very confused. There are lots of other reasons to use the right types and I talk about them as well. Data integrity and where it belongs is a focus here as well. When we get into the physical structures, I don’t hit the obvious like partitioning – but rather the not so used physical structures like hash clusters, index organized tables, clusters in general and the like. We move on to indexing and in particular function based indexes and some unique uses of them such as selective uniqueness in a table (these columns must be unique when this is true) and indexing a where clause. Lastly, we take a look compression — index key compression and table compression.
Topic 3, All about Binds (really, I call it “IT’S all about binds”). Everything you wanted to know about binding. Why it kills performance not to, uses gobs of memory not to, how your applications stand no chance of scaling without them. How you can quintuple your throughput by using them in one case (5x the work using the same resources in the data load example I use — 10 users use as much CPU to insert 250,000 rows as 2 users not using bind variables do to insert 50,000 rows). From there, I move onto the security aspects. It still surprises me that so many people are not aware of SQL Injection! It is a huge problem. Then we look at bind variable peeking, cursor sharing and explore the differences between exact, force and similar. One of my favorite topics. I even discuss when not to use binds. Believe it or not.
Anyway, I gave this session to the developers at ESPN. Afterwards, they took me on a studio tour. That was pretty cool. This is what I would look like as a sportscaster:
Didn’t see any celebrities – but did get to see the first all digital, totally electronic studio. No tapes, just bits and bytes. Gave me some ideas for my desk at home. Now, if I can just figure out how to get 4 monitors attached to my computer….