jump to navigation

I’m Proud to now be President Elect of the UK Oracle User Group March 23, 2018

Posted by mwidlake in UKOUG, User Groups.
Tags: ,
3 comments

At the start of this week, voting for the 2 new UKOUG board members was closed and the votes were counted. Tuesday Morning, I received a call from Carl Dudley, the chair of their appointments committee, and was informed there had been more “Yes” votes than “No” votes for me – So I am now President Elect of the UK Oracle User Group!

It was a relief to know I’d received the approval of the majority of people who had voted for the new president – I was pretty certain that I’d win, given how many words of support I had received, but there is always that doubt… I was curious as to how close the vote was, but Carl was very professional and would give me no clues.

I’d like to thank everyone who voted for me, and also all the people with the Oracle community who showed support on social media for me. I should also mention that my wife, Sue, did not just say “oh go on, if you must” but encouraged me to put my hat in the ring.

I should make one thing clear – I am not yet President, I am President Elect. I’m “President-in-waiting”. I’ll be shadowing the current President, Paul Fitton, until his term ends in one year. This gives time for me to take over the various contacts and communication channels and learn what is involved in the role. I do not have a vote on the board until I take over from Paul, but I do get involved and fill in for duties when Paul is not available. I’m not sure exactly what this entails yet!

I’m pleased to say that Neil Chandler was voted in as the new Member Advocate in the same election, so he will also be joining in with all the fun.

The role of President is a serious one and it involves representing the whole of the user group, not just the tech side that I have historically been involved in. I’m going to have to expand my horizons a little.

Does this new responsibility mean I’ll stop being the relaxed, flippant person I sometimes (usually?) am? Well, yes, to some degree. You alter your behaviour to suit the situation you are in, just as most of us do when we are filling a managerial role or dealing with important work issues.

But I think we should never take ourselves too seriously. So, just for a little light humour… This is how some of my friends reacted to me becoming President Elect of the UKOUG. They congratulated me but also did the traditional “Make the enormous guys stand behind Martin and take a photo to tweet…” thing.

What you don’t get from the photo is that Neil was shouting “Viva El Presidente!” exactly as (for those who remember it) Vivian does in “The Young Ones”.

Thanks, Neil.

But my favourite shot is this one – Ilmar Kerm and Klaas-Jan Jongsma offering to be my “heavy Squad”. I’m sure I won’t need one and, besides, they are both too nice for the role.

ScreenHunter_334 Mar. 24 13.43

Advertisements

Friday Philosophy – Not My Cup Of Tea March 16, 2018

Posted by mwidlake in ethics, Friday Philosophy, Perceptions.
Tags: , ,
3 comments

A few days ago I tweeted a copy of a “motivational poster”. I don’t normally like motivational posters but this one struck a chord with me as it was a lesson I took a long time to learn. Not everyone will be your cup of tea. Which is a very British (I think) way of saying you don’t like something or someone. “Ohh, that Mavis, she’s just not my cup of tea!”.

Over time my opinion of people and how we all get on have changed.

Not everyone in this world is going to like you. No matter what you do, how reasonable you are, the number of olive branches you offer, some people are just never going to like you. That bit I learnt early at school when Nigel was leading the bullies. Each one of them I could manage on their own, negotiate some peace, but not Nigel. Over time I realised it’s just a reality: some people will not like you and there is no discernible reason. And it can be a very passive dislike – no anger, no hate, just a total absence of like rather than actual dislike I guess.

You are not going to like everyone. This is not a case of you needing to be a better person or some sort of saint, I don’t think I’ve met anyone yet who likes everyone. Some people respect everyone, have time for everyone, will try to think the best of everyone. But not like. I did not like Nigel, for good reason, but there are other people who I do not like who have never done anything bad to me. Again, it is not that I dislike them, I’m just indifferent or mildly irritated by them. For many years through my 20’s and 30’s I thought I should try and alter that – but I failed. I just don’t like some people.

It’s OK and Normal that some people you will just not get on with. I struggled with that for years. Surely, so long as someone is not psychotic or just simply a bad person, bridges can be built? When I started thinking more about teams, managing people, getting people to work together, I did learn more about how to identify the reasons for bad feeling and resolve them. I had more success at it than I thought I would, and acknowledging that half the time it was my fault not theirs helped. But with some people, no it was not happening, we did not like each other. But things could usually be improved – if not bridge-building, then at least waving politely at each other from our respective sides of the river.

That led me to what I felt was the final part of being someone’s cup of tea. I like tea with sugar and milk, some people think that is disgusting and, anyway, it should be green tea. They are wrong. But it does not matter. If they want a cup of tea, I’ll make them a cup of green tea.

Not getting on with someone is not a problem – so long as you don’t MAKE it a problem. If you don’t like someone there is no need for you to make them “The Enemy”. If you do, well you just made an enemy and that person is likely to be obstructive to you, retaliate and generally make life less nice. And that will spill over to others around you. Oh, I’m not a saint, I try to apply this rule to myself but I don’t always pull it off.

I’m not wise enough to know all the reasons we do not all get on but I think sometimes the reasons are just not important. I might remind you of someone you really detest, I might find the way you keep singing bits of “The Smiths” an affront to good musical taste. And even if there are reasons that seem good, the less antagonistic you can keep it, the better. And I repeat, sometimes it is not active dislike, it is just an absence of like.

The context is also a factor in this. In a social situation, if you do not get on with someone it’s easiest just to avoid them. And we all do this. But you don’t need to try and make everyone else dislike them. In a work or family situation it can be harder as you have to deal with people you don’t like. I think that acknowledging that you just don’t get on and it happens, no blame either side, makes it easy to be equitable about it.

It seems to me that the people I do not get on with have a different life philosophy to me and the larger the difference, the larger the chance of dislike. I don’t like Right Wing conservatives. I don’t like selfish people. To them I am probably sanctimonious, deluded and borderline communist – which is not fair, I AM communist. In that I think our community is the most important thing about being human. But I also use humour a lot and that really annoys some people as I use it in inappropriate settings or they do not think I am taking issues seriously enough or professionally enough. And they may be right.

So, all very good and very grown-up of me so far. Now for my final point.

Some people are just not nice. We’ve all met them, the person who no one can get on with as they are so self-opinionated, bullying, harsh, self-serving. And any attempt to build bridges with them is either seen as weakness or used as a way to get you on-side before they hang you out to dry.

Is this just an extreme case of not being your cup of tea? Well, maybe, but I don’t think that.

Some people are just not worth the trouble. And some people are trouble.

It comes back to Condoning Bad Behaviour. I actually decided that some people are not nice (and probably never will be) long before I came to the conclusion about it being OK to not get on and trying to not make it a problem. At that point I wondered if that would be the whole solution, just accept that you do not get on and let it lie.

But I kept hitting up against the occasional person who, no matter how much you tried to not make it a problem, they did make it a problem. And they continued to bully, oppress, be antagonistic – and they got away with it. With these people I still try and walk away. And if I cannot? I don’t condone bad behaviour. I’ll tell them what I think and, if I can, I’ll stand against them. It is not easy though as they are like Nigel. They surround themselves with similar people or stooges they can direct. Now that is a totally different issue.

I think it’s right to try and be friends with everyone.
But you won’t be friends with everyone so strive for peace with the others.
And if peace is difficult, distance should work.
But I will not condone bad behaviour, OK?

Some people need to see me using this cup

Friday Philosophy – Explaining How Performance Tuning Is Not Magic? March 9, 2018

Posted by mwidlake in Friday Philosophy, performance, SQL.
Tags: , , , ,
8 comments

Solving performance issues is not magic. Oh, I’m not saying it is always easy and I am not saying that you do not need both a lot of knowledge and also creativity. But it is not a dark art, at least not on Oracle systems where we have a wealth of tools and instrumentation to help us. But it can feel like that, especially when you lack experience of systematically solving performance issues.

SQL statement be fast!

I recently spent a couple of days with a client discussing how you solve performance issues and I am preparing a talk on exactly that for the up-coming OUG Ireland conference on the 22nd-23rd March. The guys I was talking to at the client are very, very capable production DBAs, but traditionally the developers at their site initially look at any performance issues. If they think it is the database but not something they can fix, they throw it over the fence at the DBAs. It’s not always the database of course and, if it was a simple fix (missing index, obviouosly inefficient query), then the developers fixed it. So these two guys are expected to only solve the more difficult issues. That’s not really fair as, if you are not practising on the simple problems how are you supposed to gain the experience and confidence to solve the harder ones?

Anyway, a part of the discussion was about Explain Plans. What does the COST mean in the plan, they asked? They saw it as some number that in an undefined way gave an indication of how expensive the step in the plan was, but they could not link it back to anything solid that made sense to them. It looked like a magically produced number that was sometimes very, very wrong. Like most (good) technical people, they want to know the details of things and how they work, they don’t want to simple accept something as working.

So I took them through some simple examples of plans and of how the COST is just a result of simple maths estimating the number of IOs needed to satisfy the step.

I won’t go into the full details here but have a look at the below, this is how I started:

I explained how you read “down” the slope of plan to the end (so step 3) and then worked back up the slope. So the first thing Oracle does is the index range scan. I showed them the BLEVEL of the index, the number of blocks per indexed value and why Oracle knew it would, on average, need 3 IOs to get the leaf block entries for the provided “DOB=to_date(’08-OCT-1934′,’DD-MON-YYYY’)”. Each DOB matched, on average, 20 rows. So the cost of step 3 was passed up to the step 2 of accessing the table rows. This would be done 20 times so the cost was 20+3. 23.

OK, they could accept that, it made sense. So let’s extend it…

I took the original query against PERSON for a given DOB and now joined it to a second table PERSON_NAME. Why is not important, it’s just a demonstration of a simple table join:

Now I explained that as you work “back up the slope of the plan” from the first, most indented step (so from step 5 to 4 to 3) at 3 there is a nested loop joining the rows passed to step 4 to the step in line below it, i.e. step 6. They had already seen steps 5 and 4 in our first example, Oracle is expecting to get 20 rows for a cost of 23. Look at line 4. And for each of those 20 rows, it will do a range scan of the index in step 6 and for each row it finds in the index, collect rows from the joined table in step 7.

So for each of the 20 original rows it does a scan of an index on the joined table for a cost of 2 (I showed the stats to them how this cost is calculated) and expects on average to find 5 matching rows so it needs to do 5 IOs to the PERSON_NAME to get those rows. Add that together and that cost of 7 is done 20 times. 7*20 is 140, plus the 23 from the orginal scan of the PERSON table, the whole COST is… 163.

Light bulbs came on and they got it! My job here is done.

But it was not. I then went on to explain how it is now hard to get such a simple example. This one is, I think, from an early version of Oracle 11. I told them how histograms on a column will make the estimated cardinality (number of records per given value for a column) more accurate, but harder to work out. I showed them how the cost of a unique index scan is reduced by 1. I explained how Oracle was blind to the correlation of column values unless you took steps to tell the optimiser about it (you know, how for a given value of car manufacturer there will be only a few values of car model, the two values are related)…

Worry was creeping back into their faces. “so it is simple mathematics – but the rules are complex? It’s complex simple mathematics?!?” Err, yes. And with 11 and 12 Oracle will use various methods to spot when the simple, complex mathematics does not match reality and will swap plans as a result…

I think I lost them at that point. Especially when they asked about the SQL Profiles and how they modified Costs… Baselines controlling how plans are used… Bind variables…

That is a real problem with Oracle Performance tuning now. Even something as simple as COST is based on a lot of rules, factors and clever tricks. And they are not the only things controlling which plan is executed anymore.

So I took a step back.

I told them to accept that the COST is really, honestly based on maths, and the expected number of ROWS is too. But the actual, specific values could be hard to totally justify. And it is when the estimated COST and (possibly more importantly) the estimated ROWS goes wrong you have problems. So look out for ROWS of 1 (or at least very low) in a plan for a statement that takes more than a few milliseconds. And for very, very large COSTS/ROWS in the millions or more. And what really helps id if you get the ACTUAL ROWS as opposed to the ESTIMATED RIWS. Where there is a significant difference, concentrate your focus there. Of course, getting the ACTUAL ROWS is not always easy and is for a later (and properly technical) post.

So, they asked, if they could not get the actual ROWS and there were no 1’s or millions’s in the plan ROWS/COSTS? How did they know where to concentrate? “Well, you just get a feel for it… do the costs feel reasonable?…”

Damn – I’m not sure I really delivered on my aim of proving Performance Tuning is science and not magic.

Any pointers anyone?

(Update – Vbarun made a comment that made me realise I had messed up the end of this post, I was talking about estimated ROWS and still had the words COST there. Now fixed. And the other thing I was hoping someone was going to suggest as a pointer was – to split the query down to individual tables & two-table joins and *check* how many rows you get back with the where predicates being used. It takes some time but it shows you where the estimates are going wrong.)

Friday Philosophy – Criticism is Critical for Believable Endorsement March 2, 2018

Posted by mwidlake in ethics, Friday Philosophy, Perceptions.
Tags: , ,
7 comments

If you had a friend who always told you that your were the best, that you had no faults, and that everything you did was great – would you trust them? I know I would not. I am fully aware that I am not perfect(*). I used to see this sometimes in relationships too, especially when I was younger. One of them would be so desperate for their boyfriend/girlfriend to like them that they would never criticise the light of their life. The relationship never lasted as it was, well, creepy and false.

Perfect In Absolutely Every Way

For your opinion of someone to be seen as honest, there has to be space for criticism. I love my wife very much, but she’s crap at loading the dishwasher. Joking aside, I believe my wife when she says she likes some aspect of my character as she will tell me about the ones she does not like. Thankfully, not at length.

In exactly the same way, for your opinion on a technology or application to be accepted as honest & worthwhile, there has to be space for criticism. I’m not saying that there has to be some criticism within any given endorsement of a product, I’m saying you need to be confident that the person would mention any faults or drawback they are aware of for you to believe that endorsement. I’m really hoping you are all agreeing with me on this!

So why do Marketing departments so often not get this? What is so fundamentally broken – OK, let’s be nice and say different – about their view of the world that any criticism is not acceptable? I just don’t understand either their belief that their product is perfect or that people will be fooled by an uncritical opinion of that product.

I can see how this would work in social media reviews like TripAdviser though. I recently did reviews of several places I had visited and a couple of companies then contacted me to ask me to remove the bits where I had said anything negative. They fundamentally wanted me to lie for them, or at least implicitly (and complicitly) give a better review by omission. I don’t take it well when I am asked to lie. In this case of social media I can see how “cleaning up” the reviews might help as most people look at the sum of all reviews and not at the reviewers.

But when you are actually a known person giving a review or endorsement, your reputation is critical to how the review is perceived.

What triggered this post was I recently discovered a friend of mine had been asked by a marketing person to remove some negative things they had said. They refused and made the point I have just made – if they were to be seen as believable when they said something else that the company produced was great, they had to be seen to be honest in criticising anything that was less-than-perfect. And let’s all be grown up about this, I’d say no software or application is perfect! However, the marketing person found this concept alien to them.

I wonder if people who work in marketing departments have difficulty maintaining long-term relationships? Based on my experience, quite a few of them are willing to ask you to lie for them and they don’t understand honesty is core to trust. Or am I just being very, very naive?

For me to trust the opinion of someone commenting on software & applications, in fact on anything really, I want to see some proof of their integrity by them being critical as well as complementary. If it is all positive, I will assume that their opinion is bought in some way or they are not particularly discerning. So Marketing People asking for negative comments to be removed? You are doing your employer a disservice. Please keep that in mind.

(*)I’m not perfect – but sometimes I’m so close it hurts. My wife got me a T-shirt with this on, so it must be true… Or she was being sarcastic?