jump to navigation

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

Posted by mwidlake in Perceptions, Friday Philosophy, ethics.
Tags: , ,
1 comment so far

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: , , , ,

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 but the actual, specific values could be hard to totally justify. And it is when the COST goes wrong you have problems. So look out for COSTS 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 in the millions or more. And what really helps id if you get the ACTUAL COST as opposed to the ESTIMATED CIOST. Where there is a significant difference, concentrate your focus there. Of course, getting the ACTUAL COST is not always easy and is for a later (and properly technical) post.

So if they could not get the actual COSTS and there were no 1’s or millions’s in the plan 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?

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

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

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?

Will I Be The Next President Of The UK Oracle User Group? February 16, 2018

Posted by mwidlake in Oracle Scene, UKOUG, User Groups.
Tags: , ,
add a comment

I’ve decided to put myself forward to be President Elect of the UK Oracle User Group (UKOUG). The position of President Elect is, in effect, President-in-waiting. You shadow the current president before taking over the role when their term comes to an end. In this case, that will be in a year.

I think this is a very sensible manner in which to introduce a new person into the role of President. The UKOUG is one of the largest Oracle user groups in the world. It is in effect a small company with permanent staff and a large number of interested parties, the members. About 1000 companies have at least one membership with the UKOUG, some hold several (as each membership comes with conference passes). The position of President comes with 3 main duties:

  • Representing all members of the users group – end users, partners, sponsors. There are two other positions on the board of Member Advocate, so the president is one of three (out of a total of 6) representing the membership.
  • Being the ambassador for the UKOUG. This is partly being the “friendly public face” of the organisation but, as President, you represent the UKOUG to other user groups, Oracle Corporation and the press.
  • To ensure that the UKOUG meets it’s requirements as a company and has the correct governance in place. For the UKOUG a lot of the governance is about ensuring the board is selected or appointed correctly, legal requirements are met, and that the user group is run in an open and fair manner.

Why would I want to take this on? It is not a paid position, it is voluntary.

(I should maybe be a little clearer here on pay – voted positions on the board, i.e. member advocate and president, are not salaried. But expenses are paid and there is provision for some payment for specific project work, or if the demands of a role exceeds a number of hours in a given month. But you would be unable to live on it, no matter how frugal you are!)

Well, as many of you know, I’ve been an active volunteer for the UKOUG for a long time, it’s actually over 10 years. I present at nearly every annual conference, at a couple of the Special Interest Groups (SIGs) each year and I’ve chaired or deputy chaired SIGs since 2009. I don’t just do the “standing up and being noticed” stuff, I help out with the organisational work. I was in charge of the Database content at Tech14 & Tech15 and all the content of Tech16. I’ve sat on strategy committees, reviewed submissions, analysed speaker scores… I’m currently editor of the UKOUG magazine, Oracle Scene. I know some people think of me as “that guy from the UKOUG”. Maybe being President would be less work!

When the UKOUG announced that the position of President Elect was open, it seemed natural to try and take that final step up the Volunteer ladder to become a member of the board.

When it comes down to it, I love being in the Oracle community. I’ve made so many friends across the globe through not just the UKOUG but by going to the conferences & meetings of other national Oracle User Groups. I have learnt so much from user groups, not just from lectures but directly from the people I meet. The majority of people who get involved in user groups are not only intelligent and wanting to learn, they are also willing to share and teach.

Another part of my wanting to be the President (eventually) is that I don’t think the UKOUG is perfect. The organisation does evolve and change as the technology and market shifts. But I’d like to try and shake things up a bit and slightly alter where it’s focus currently is. I won’t say any more on that for now.

There are also big changes for some Oracle customer, namely Cloud, Chatbots, AI and the fact that hardware is shifting. Solid State storage and Oracle’s own in-memory tech is making some things possible that were impossible with the old physical storage and row-based processing. But soon we will have storage that is an order of magnitude faster than current SSD, almost as fast as main memory.

Oddly enough, one problem I see a lot is that there is too much focus on some of those new areas. Many people are still running systems where cloud and SSD are not part of their world. Yes, they would probably all like to move forward but if the systems they have can’t move on, they still need to get the most out of them now. User groups are not just for those chasing the latest-greatest, they are just as much for those who need help keeping the wheels on. I think the user group needs to reach slightly back before we can help them forward.

Many of you won’t be able to vote for me as only members of the UKOUG can vote. But if you can, I’d appreciate your vote. And I will need those votes.

There is one slight oddity. I am the only person standing for the position of President Elect (the position of Member Advocate is also open and being voted for at the moment, for which there are three candidates). However, there is still a vote, I will not take the position uncontested. The vote is a yes/no/abstain one, so you can either support my bid to be the President Elect or voice your opposition. There are issues with yes/no votes but over all the UKOUG board felt that as the user group is run on democratic principles, the members should be able to have their say over if they feel I am suitable to eventually become their President or not. If the number of votes are low, it edges things in the favour of “no” so I still need to campaign.

(If you can vote, you can do so Here)

As for the contest for the position of Member Advocate, I’ve voted for Neil Chandler. I know Neil well and he is just as passionate about the UKOUG as I am and I know he will work hard to keep it moving forward and improving.

Let’s see what happens come the conclusion of voting in March.

Friday Philosophy – Condoning Bad Behaviour February 2, 2018

Posted by mwidlake in Friday Philosophy, Management, Perceptions.
Tags: ,

I used to work with a man called Nick(*). Nick was friendly enough, he was good at programming and he had very few annoying personal habits. Nick was easy to work with.

I WON’T take my share of the Christmas Cover!

When he finally turned up.

You see, Nick would sometimes turn up around 9am like everyone else. But more often he would get in just before 10am. And then it started to go past 10am and more like 10:15, 10:30… soon it was closer to 11am. He used to stay quite late to make up the time and he got done the programming work he was allocated. But it was a pain in the backside for everyone else. People who worked with him would be waiting for him to turn up and he would sometimes amble into a meeting after it had started.

Then I found myself managing Nick and about the first thing I did was have a little chat about his timekeeping. Nice, friendly Nick did not like this, he could not see the problem, he stayed late to do his work, the company was getting it’s “pound of flesh” as he put it. Why did it matter? So I explained the impact on the rest of the team and that core hours were clearly stated: 10:00-12:00 & 14:00-16:00. During those hours we all knew everyone was around and we could collaborate, it’s called team work.

Nick was having none of this – “If this was a problem, how come Sarah never raised it as an issue?”. And there was the reason that this was not just a small problem but a big problem. Yes, Sarah was his prior boss and she had not said anything to him about it. “You are just trying to show who is boss!”. Yes, yes I am, and being your boss is partly to tell you when you are doing things wrong, so stop it.

Nick’s prior boss had made the decision to condone bad behaviour, to let Nick come in later and later without intervening. Sometimes condoning bad behaviour is an active thing, like laughing at sexist/racist jokes, but usually it is a passive thing. If someone is doing something wrong and, as their manager, you do not challenge it then you are accepting it, you are condoning it. And once you have let it slip a few times, challenging it is harder. In Nick’s case it had resulted in the occasional late arrival becoming common, an accepted situation and a much more significant issue. It was also now a harder behaviour to challenge.

This situation is of course not limited to the manager/subordinate relationship, sometimes our friends or relatives behave badly and you have the choice to accept it or challenge it. I think that helps us immediately understand why we condone bad behaviour, as to challenge it causes confrontation. And very few of us like confrontation.

In another situation I had, there was a guy who would suddenly just go off the deep end for no good reason. Something would annoy him and he would start shouting and getting angry, way beyond what was reasonable. Now, to challenge that kind of bad behaviour you know it is going to be hard work. Thankfully, my boss at the time did, and explained to me at length and very forcefully that I needed to be more mature and less of a dick.

I think we can all agree that we should not condone bad behaviour but we can be reticent to do so due to the conflict.

Of course, a particularly difficult situation is when it is your boss (or parent!) who is behaving badly!

You will respect my authority!

Also, at what point do you challenge the behaviour? Probably not at the first incident, especially if it is minor like turning up to work late. After all, it might be a one-off, they may have reasons for the behaviour (one person I managed was turning up late as they were having a hell of a time at home, they needed some slack). Something more serious such as socially unacceptable behaviour, you need to question it right away. You also can’t challenge every small thing you perceive as wrong, you will just annoy everyone and become regarded as a control freak/moral bore.

You also need to consider the impact of challenging them. If it is over something that would embarrass or offend them, it could sour your relationship with them and the rest of the team. Catching someone out lying can be tricky to deal with (I once had someone ask me for holiday on short notice as a relative was ill. But his new girlfriend also reported to me and she was honest about the “urgent need” for the holiday…). I think the most common decision made when the bad behaviour is one that the other person will be embarrassed or in denial over is to let it lie or challenge it “if it happens again”. Only, just like with Nick and his late arrivals, each time you delay addressing the bad behaviour it will get harder to do so.

I can’t claim that I always handled the condoning of bad behaviour as well as I should, I was by no means a perfect boss or friend (or relative). I think it is one of the hardest parts of being a manager, especially if you are averse to confrontation. But over all, I’ve suffered more in the long run by not challenging bad behaviour than I have by trying to handle it.

As to how you handle it, that’s a whole different topic…

(* Nick was not his real name, I changed it to protect the innocent… It was Dave)

UKOUG Conference Survival Guide November 29, 2017

Posted by mwidlake in conference, humour, UKOUG.
Tags: , ,

I’ve been going to the UKOUG conference for about… Well, most of this century. I think this year (2017) will be my 14th visit. Not only that but I’ve helped organise the tech side of the conference for several years. I was the Database Stream or whole Tech Stream lead for the last 3 years (though, this year, blame others as I passed over the duties to Neil Chandler as Tech17 lead and Chris Dunscombe as Database lead). I also grew up 30km North of Birmingham, in a little city called Lichfield – but to be honest that does not help as my family was from Nottingham and we went there to shop.

So with my many years of experience, here is my Survival Guide to UKOUG Conference in Birmingham.

Oh, and just to be clear. I sometimes say “we” when talking about organising the conference. It is habit. I was not involved this year.

Getting There


A lot of people arrive by train, coming into the main train station, Birmingham New Street. This used to be a dark, horrible, Stygian nightmare of a train station but now it is bright, clean and has a nice shopping centre above it. It is just a 10 minute walk up the road called New Street, through the German Market and then bearing left-ish (probably past the Birmingham Town Hall) towards Broad Street where the conference centre (the Birmingham ICC) and most hotels people stay in are clustered. There are underpasses or bridges to take you over the horribly busy road that is in the way.

There are a few other train stations in Birmingham city centre (Moor Street, Snow Hill and Five Ways ) but I have never used them, sorry. Apparently you can walk to the ICC from them. Or get a taxi, but as it is Christmas and Broad Street is very close to the shopping areas, expect a slow taxi journey.

It is probably too late for this advice, but buy UK train tickets as soon in advance as possible. Train fares in the UK are stupidly high (for a crap service) and the sooner you book, the less eye-wateringly expensive it is. The UK is about the only European country where the trains are run privately for profit rather than by the government, which is why they are so “efficient and good value” here. Not.


Again, a bit late for advice on your actual plane route but if you come into Birmingham international get the train in. The service is regular and quick. Taxies, especially at this festive period, are likely to be slow and expensive. I have never tried Uber in Birmingham but UK Uber is in a lot of trouble at the moment as they have been accused of not vetting their drives much.
If you are coming into London, again get the train. From London Euston to Birmingham NEW STREET (not Birmingham International, that is the airport). It takes about 90 minutes.


If you are driving into Birmingham then in some ways it is good, in some ways it is terrible. For example, the A38M gets you deep into Birmingham pretty quickly and smoothly but, like a lot of cities, at times the route is a bit confused and, as it is Christmas, the centre of Birmingham itself will be hell to drive around. Once you get near the centre the traffic will just stop.
I advise you allow for at least half an hour or more extra for driving into or out of Birmingham than you expect. If you arrive on Saturday or on Sunday afternoon add an hour.
If you are leaving by car on Wednesday afternoon, I suggest you consider having a final coffee or light meal in Birmingham before you go. Trying to drive out of the Broad Street area between 4pm and 6pm is something I do not want to have to do again in my life. One year (when it snowed a bit) it took me 2 hours just to get onto the M42 that circles the East and South of Birmingham.

If your hotel has reserved parking, great. If not then good luck. Check the UKOUG web site for suggested car parks, plan which car park you go for and remember, Saturday and Sunday all public car parks will be very, very busy. I had such a nightmare last year when I arrived on Saturday that I am parking 20 miles away and coming in by train!

Once There…

Once you are at the ICC you won’t need public transport – unless you booked a hotel a distance from the conference, in which case you are on your own. Or you are local and coming in and out each day. In which case you know the place and you are on your own.

You can walk to enough bars and restaurants as you could want, taxies in the evening for a couple of miles are not too bad. Access for wheelchairs is pretty good in the UK, there is step-free access to the ICC. I have a nasty feeling you cannot go across the canal to the main bars & restaurants from the back entrance of the ICC by wheelchair, but you can go via Broad Street.


Food & Drink

The UKOUG conference is great for breadth and depth of content. It is not so good on the catering front…

Coffee & Tea

It seems like a small thing, but getting a cup of tea or a coffee at the UKOUG conference can be a bit of a trial. Unlike other conferences, such drinks are not always available. I know, it’s mad. I’ve tried to argue about this when I’ve been involved in organising the conference but the ICC charge silly amounts for constant provisions of these conference basics and the UKOUG want to use the provision of drink and food to drive footfall through the exhibition. When it is the allotted time for Tea/Coffee, the queues are of course bad. And the ICC staff take some sort of evil delight by directing you to a different queue. Which turns out to be just as large or, occasionally, not even open yet. (They do this at lunch time too).

To make things worse, providing drinks as an exhibitor seems to be a real challenge too. I looked into having my own stand a couple of years back, with decent coffee. To provide anything more than the odd jug of real coffee would have cost me a fortune, if even possible.

I would advise you just hang about a bit. Maybe get a biscuit before someone who is trying to get a week’s calories from just the conference food hoovers them all up. Then get a coffee/tea once the rush dies down.

There are water coolers around, so you can get water. If it does not run out. Don’t drink water from the bathrooms, it is not “potable” unless otherwise stated – it will be going through a tank  which may or may not have a dead pigeon in it.

However, on the floor below the main conference reception area (so technically outside the conference) there is a coffee company that will sell you something approaching coffee or tea. And if you go out of the “back” of the ICC  and over the canal, there are some coffee places out there.

I suggest you get a bottle of water and keep it filled and with you. The conference rooms can be warm and if you “enjoyed yourself” the night before you could be dehydrated from that too. I used to get tired and suffer headaches until I realised I was constantly dehydrated.

Conference Food

The lunch will be OK. Probably. It varies from year to year. Last year we had a buffet as opposed to a “real” meal and, I have to say, it was a hell of a lot better than the slime provided the year before. If you are vegetarian or have allergies I hope you said so when you registered. In any respect, let your needs be known to the catering staff or the UKOUG staff. If the member of catering staff you are asking does not understand you, go ask someone else. It’s just not worth the risk.

The food provided on Tuesday evening is OK and, if you are determined, you could eat enough to count as a meal. But most people will go outside the ICC for evening meals and drinks. I would recommend you do so.

Drinking and Eating in Birmingham

The conference is in central Birmingham. There are lots of options. If you go out the “back” of the ICC (the opposite side to the main entrance, where there will be some sort of winter fair) you will go over the canal and find many plastic bars and restaurants. You know, All Bar One, Wagamama, Pizza Express, Slug and Lettuce. If that is your thing, you will be happy.

The conference centre is on Broad Street. If you come out the main entrance where the fair is, go right and then once at the road, go “back” along the side of the conference centre. If you come out the back entrance, head left (by the canal or once you have reached the bars). If you are not on Broad Street within 1 minute, you went the wrong left. Here there are more bars, restaurants, even an executive gentlemans dancing club. I have no idea how entertaining  executive gentlemen getting groovy is, I never popped in. There is a lot of choice of types of food up and down Broad Street, though the national cuisine of curry is most in evident. Please do not ask me to recommend anywhere, I loose track of where has been good. Use an App.

I would suggest you do NOT go out in a gang of 20 and expect to get seated. Go out in a gang of 4 or 6, maybe 8 and you will fair better. If you want a bigger group, use your search app of choice and book somewhere.

I would also suggest you be willing to walk more than 5 minutes, it really increases your choice and places are less busy. There are some nice Chinese and Thai places a little further out and lots of other food choices. For drinking I like the “Wellington” pub and there are a couple of other real-ale places scattered about but near by.  There is also the *speaker’s pub* but I won’t tell you where that is as you will all go there and I won’t be able to get in. I’ll happily take you there though. Let’s just say it is much improved since it was renovated and stopped smelling or urine.

Most people end up in the bars and restaurants near the ICC but if you walk back towards New Street (not all the way to New Street!) you will find the German Market where you can get Gluhwein and other bars with more character.

As the years have gone on, I’ve been more likely to pop out from the conference to get lunch or have a quiet coffee. It helps me keep fresh for the rest of the talks I go to.


Alcohol is of course utterly optional. But it seems a lot of British people and international conference presenters opt for it. There should be non-alcoholic options at all UKOUG organised social events. If there is not, feel free to complain like hell as it has been an issue once or twice and should not be.

Given you do wish to partake of the odd alcoholic beverage I feel I would like to offer some advice. That last pint in the hotel bar before you go to bed? Why is it always that one that is bad? I try and keep things in moderation until the last night at least Trying to concentrate on index internals whilst the Hangover Pixies bang hammers on the inside of your skull is not easy.

As a general rule, alcohol is not available in the conference during sessions.

As a general rule, after all sessions are finished, alcohol seems to be appreciated by many.

If you are not English (and in particular if you are from the US) you should be aware that our pints are a bit bigger than a US pint or a half litre. Also, though I know that the US have finally got their heads around “craft beer”, English beer (especially Real Ale) tends to be a bit more flavoursome and stronger than what many people thing of as beer, namely lager. You can get lager from most of the bars around the ICC and nasty, bland pap it is too. I’ll be holding out for beer that is brown, above 5 degrees C and is not mildly fizzy. Preferably delivered from the keg via hand pump, not just pressure-squirted out of a tap.


The Conference

Firstly, I’ll admit my prejudice. Other conferences have their own selling points, I actually personally prefer a few of the smaller national conferences, but for breadth of content and the technical validity of what is on offer, I don’t think you can beat the UKOUG conference. DOAG is on a par and is a little larger, but I think is less relaxed than the UK experience. Oracle Open World is a massive, ball-achingly on-message sales and marketing event that frankly I can live without. The UKOUG conference is independent of Oracle and, though we love having their presence and speakers, you will get talks that are not all “Oracle is the best”. You even sometimes get Oracle corporation speakers letting slip the occasional negative word or admission that something could be better. We put things in the water to make them more honest. Yeast, barley and hops, mostly.


The UKOUG conference is big. Tech17 has something like 12 concurrent streams, 3 or 4 of which are database, a similar number across development and middleware. And you can move between Tech17, Apps17 and JDE17 as you wish now.

There will be times you want to see more than 1 session on at the same time. Sorry, this is impossible to avoid for the organisers. I’ve spent days in darkened rooms working on the agenda in the past. We try to make sure that talks in the same technical area (e.g. Database) are not on similar topics, we try not to put popular talks/presenters in small rooms or against each other. We try to look across the agenda so that a database-based talk on PL/SQL is not clashing on a PL/SQL talk about database management. But it is impossible. We organisers make mistakes or we simply do not see what is obvious in retrospect. Add to that short-notice changes in speaker availability and other run-time issues, the planning is not ideal.

But the main reasons we get such clashes is that:
(a) We have no control over what you lot are interested in. You might be passionate about APEX and database performance, or in-memory and Java. There are too many variables to plan to suit everyone
(b) There are so many good talks submitted by known speakers we could pack the event with only known, established speakers that you all want to see. And we don’t as we want to encourage new speakers and new topic areas.

So, when there is a clash, please try to be mellow and just accept that the UKOUG put on SO MUCH good content you are going to have to miss something.

And for when there is nothing at all you want to see? Sorry, it will probably happen too, it’s called random variation. Read below for suggestions.

Try to plan your day and what sessions you are going to. I have a piece of paper or the full agenda and I put big circles around the talks I intend to go to, so that I don’t have to keep thinking about this stuff as my head fills with new information.

Go to one or two sessions outside “your” area. It’s good to expand your viewpoint. Some of the best, most useful talks are ones I had to go to as I was chairing them. So now I throw a couple of oddities in each year. This is of course an ideal thing to do if you hit a point where there is no talk you really want to see. Rather than go see a talk you have seen before or a speaker who is well known, go see a talk on something you know nothing about.

HAVE A BREAK. If you feel your head is full or you cannot concentrate anymore, skip a session and chill. Have a coffee. Chat to people. When I first started coming to UKOUG conference I would go to 7 or 8 talks in a row. I did not really remember the last couple from day 1 or 2, or most of them from day 3. Because I was too tired to process new information anymore. Now I take the odd session out and, over all, I learn more. Pace yourself.

GIVE FEEDBACK! You buggers are getting worse and worse each year for filling in the feedback forms. I know, you all think you will do it online later. You won’t. You never do. I know, I’ve been reviewing the feedback for years. Fill in that paper form. And be honest. Don’t give everyone 5 or 6 for everything, apart from Derrick who was crap and you give 1 or 2 for everything. Of course, any talk I do (I’m not doing one this year) is 6’s across the board. But use the whole breadth of the scoring. (update, see the comment section).

Those feedback scores not only help the presenters personally, we use them when planning who gets to talk in future years. We really wish you would just tell us what you did and did not like. Please.


Speakers are there as they want to be there. Well, most of them. So feel free to go talk to them when you see them around and about. Obviously don’t rudely butt in when they are deep in conversation with someone else, but of course you can chat to them in a queue for bad coffee or when you bump into them in the exhibitors hall. Oh, if you are between them and the nearest loo and they have a slightly determined look in their eye – leave them alone. And don’t follow them in! Yes, I had that once. I did not want to talk to that gentleman about Index Organised Tables right at that moment.

In my opinion, the worst time to try to talk to a speaker is… just after they have spoken! They need to get out of the way of the next speaker, you might be one of 4 or 5 people vying for attention and (true for me at least) often just after presenting you hit a bit of a lull in cognitive ability. I actually don’t tend to go to a session after I have presented as I know I won’t concentrate. So do ask your question, but ask it a little later when you see them about.

Oh, and you know those Oracle Hero Names? I’ll let you in on a big secret. They are just people, like you are. Obviously smarter and more handsome/pretty than you, but just people. Do you object if someone chats to you? No. So chat to them. And you don’t need to have a question you can, like, just talk to them like they are normal people. Apart from Tim Hall, he is strange. (Joke!)


Conference is anything but just sessions. You are surrounded by people who all have an interest in Oracle, many of whom have a shared interest with you. Sessions are great but often the best stuff comes from conversations with people. It can be hard to talk to people you don’t know, but then those people you don’t know often feel the same. Come and talk to me, I hardly ever tell people to go away.

There are social events Monday and Tuesday nights. Come to them. Relax. Drink Whisky (Monday tech Community Networking). Or water. And chat.

If you get into a good discussion with someone and a new session is about to start, well maybe change your plan and go to the same session as them. Or. Don’t go to a session. If you have found someone who has had the same slow-death-by-frustration as you with feature X or implementing Payroll version 666 then spending half an hour with them might be the best thing you both get out of the conference. It’s what the Oracle Community is all about.

Odd Stuff


I have not noticed queues outside the ladies loos. This is because IT is still a distressingly  male-dominated sphere, most conferences even more so. Though UKOUG try to encourage a better balance, one benefit for the ladies is no queuing for the loo. Men however, may need to queue! The problem is, several talks will finish  at the same time and those in need head off to the loos. The same ones as everyone else, right next to the hall you were in. Take a tip from me, if your bladder can hold on for 95 seconds, go and find a loo away from the hall. The ones down by halls 10 and 11 are quieter, it is worth seeing if there are loos by a hall that is not in use. I have my “favourite” loo, where it is always quiet. I’m not telling you where it is.

Wandering Around the Area – Safety

You will be safe in the vicinity of the ICC, Broad Street, down towards the centre of Birmingham. Of course, be sensible! Don’t wander down some dark alley on your own and don’t tell a bunch of Youth they look stupid with their trousers around their assholes (still a fashion thing for some here in the UK, I don’t get it). But you and your mate(s) will be safe wandering around where there are bars & restaurants. If you suddenly realise you are surrounded by only dark, lightless buildings – you are probably STILL safe. But maybe go back towards the bars. If I was a lady on my own, I would like to think I would not feel threatened on the main roads and thoroughfares. But I’ve never been a lady on my own. Several of those ladies I know who frequent the conference are at ease walking back to their hotel on their own. Though as a gentleman I find it tricky to let them do it, but that’s my latent sexism coming out.


Birmingham in Winter is world renowned for it’s warm climate and sunshine. Or more specifically, for how it is NOT warm and is only rarely sunny. As I type this I am looking at the long-term weather forecast and see no snow is predicted. But last time I told people there would be no snow – it snowed. (We do not get snow like say Canada or Norway gets snow. We get an inch or two that confuses everyone driving a car.)

It will be cold, I can be absolutely sure of that. A few degrees centigrade above freezing in the evenings, with a breeze. You will need a coat, gloves and a hat will help. If you are from America, it will be about 40f.  You will still need a coat, hat and gloves. Maybe throw in a scarf.

It will almost certainly rain at some point.

German Market and Shopping

I should not be encouraging you to leave the conference for a period of time, but in the evening the German Market and lots of shops are open. I personally don’t bother with the German Market anymore as I’ve been there soooo often (and, as I said on social media recently, you only need so many wooden toys and sausage in your life). But it is well worth a visit if you have not been before, or at least not for a while.

I know some people who include a mooch around the shops as part of their conference experience.

Coats and Luggage

It is warm in the ICC and blinking cold outside in Birmingham in December (see weather). So you will probably want to drop off your coat and maybe your luggage. There is a cloakroom in the ground floor of the ICC where you can do so. They will charge you a British pound or two. People complain about this charge. A lot.

You work in I.T, you are paid well, you do not want for money to pay for food and water. Just pay the damned pound will you? Take it off whatever charities you contribute to if it bothers you that much. Just don’t keep complaining at me about it.

If you stayed in a local hotel, they should be willing to hold on to your luggage for you on the last day. Depending on which hotel you are in this might not be convenient of course. If you do, how many of you will tip them more than a pound for doing so?

Friday Philosophy – Doing DOAG (& a Little, Light, Hem-Touching) November 24, 2017

Posted by mwidlake in conference, Friday Philosophy, Presenting.
Tags: , ,
1 comment so far

This week I’ve been at annual DOAG conference. DOAG is the German (Deutsch) Oracle User Group annual conference. It’s my second time there and I very much enjoyed it, meeting lots of people & seeing some great talks. I also got a request to do more Friday Philosophies, so…

DOAG is now the biggest Oracle User Group conference in Europe, it overtook the UKOUG conference a few years back. Do I see this as “competition”? Well, a little bit of me does because for several years I was involved in organising the UKOUG tech conference – and a part of me would like “my” conference to be the biggest. But that is just misplaced, juvenile pride – really there is no competition between us. DOAG caters to the German Oracle User community (and nearby countries), UKOUG to the British Isles and, to a certain extent, Ireland and the closer parts of mainland Europe. If there is any competition then it is for presenters. I know that sometimes presenters have had to pick between the UKOUG and DOAG as they can only manage so much time doing these thing. But I also know many presenters who do both. Also, both conferences are lucky enough to receive many more, very good presentation abstracts than they have presentation slots for. There will always be a great selection of presentations at both conferences.

There are some aspects of DOAG that I really do wish we could replicate for UKOUG. The first is the venue. Not only is the space they have at the Nuremberg conference centre so much larger and and better suited than the ICC in Birmingham, but it costs them “a lot less”. It might be outside of town (and Nuremberg is a nice town) whereas the UKOUG conference is almost in the middle of Birmingham, but at DOAG you get free transport as part of the conference pass. The second is the catering. The food at DOAG is very, very good; coffee is available at all times; you can get real, decent coffee from some places (in the UK you need to go find a place that will sell you decent coffee); DOAG end the conference with beers and light snacks – the UKOUG conference tends to fizzle out.

But for me, though it is a close-run thing, I do ever so slightly prefer Birmingham and the UKOUG conference. I find it a little more relaxed (certainly there are less suits in evidence) and, on a personal level, I know so many more people there. I like knowing where the pubs & restaurants are and which ones are terrible! And somewhat ironically, our German Christmas Market is not only in full swing during the conference, but it is bigger than Nuremberg’s. But how many wooden toys, Gluhwein and sausage do you need in your life?

I did have a somewhat bizarre time with my presentations at DOAG though. First, I had to cancel a presentation. I was preparing a new one on the philosophy & process of performance tuning but due to some back pain issues (or rather the impact this had on my sleep and the pain medication had on my brain) I was utterly failing to get it done. So with only a week to go I had to ask if they could replace me. I hated doing it so late, I know what it is like organising these conferences and losing talks when you have printed the agenda is a real pain. Plus you now need to find a replacement. But I also know they would not appreciate a poor talk, so I let them choose. They chose to drop the talk.

But I honoured my other two presenting slots. The first was at 11am the first day and I experienced that thing that most presenters secretly like – it was so popular there was only standing room! As a result, the DOAG organisers asked if I would repeat it the next day or last day. Of course! However, as it worked out, they asked me to repeat it later that afternoon as one speaker was lost in transit. There was of course no time to really advertise the change. So I repeated the talk 4 hours later in the largest auditorium I have ever presented in – to 27 people. They of course were scattered around the room like lost souls. I guess it was using a room that would otherwise have been empty, and the session was recorded I think. But it did feel odd.

In between these two talks, I saw a couple of other people present. And in one talk, my phone kept buzzing. That was unusual, especially as it was a German number. I eventually exited (from the front row) and took the call. It was DOAG! They wanted to know why I was not at the interview I had agreed to do. “Because that is on Tuesday!”. Pause. The confused lady on the phone said “Yes. It IS Tuesday…” *sigh* – did I mention the pain meds and my brain? That was embarrassing. I had to go back into the room, to the front, get my stuff and wave an apology to Chris Saxon & Heli Helskyah before scuttling off to this interview. Which I did very badly.

My final talk was interesting for other reasons. The talk was on calling PL/SQL from SQL and the impact it can have on performance and the point-in-time reliability of the results (if your called PL/SQL function itself runs SQL). I’ve discussed this topic with Bryn Llewellyn, the product manager (distinguished no less) of PL/SQL & EBR, in the past and I was able to catch up with him just before the talk. Then he came to my talk. I’m presenting in front of the Oracle employee who owns the tech I am talking about. No pressure. Then I look around the crowd and it is liberally scattered with other senior Oracle technical people, OakTable members, Oracle ACEs…

This is an unappreciated, small problem with becoming friends with these people. The bas…. good fellows and ladies come to your talk – and heckle.

Well, it keeps me honest and the heckling that did inevitably happen was all good-natured, and corrected a couple of slightly weak bits of my talk. So the crowd got a better talk than they otherwise would have.

And the Hem Touching? Well, go back a few years and we did not have the breadth and diversity of information the web now provides for us. In fact, we are talking back in the 1990’s when there was nothing like google and blogs and Oracle Base. What information was out there for Oracle was much more paper-based (you know, actual books & magazines!) or the odd word document that was emailed between people. One name I saw on such things quite often and who taught me an awful lot back then was Craig Shallahammer. Well, Craig was at DOAG, I’d seen him in the crowds once or twice. And after this talk he came up for a quick chat. I might have been presenting now for a good few years and met many of the best known people in our world of Oracle and I’m generally immune from the desire or need to go “Oh! You’re xxx! I’ve read all your papers!!!!”. But I did a little with Craig, as he was from my “Oracle childhood”. And he was very nice about it.

So all in all, an excellent few days. I’ll try and come again next year. Maybe if I finish that talk on the philosophy of performance tuning, they’ll let me do it?

Friday Philosophy – What Makes a Community? November 10, 2017

Posted by mwidlake in conference, Friday Philosophy, Perceptions, Presenting, UKOUG, User Groups.
Tags: , , ,
1 comment so far

Earlier this week Daniel Westermann asked a question on twitter: “What is community?”

What is a community?

Daniel was not specific about if this was a work/user group community or a wider consideration of society, but my first thoughts were about the Oracle community (or communities) that I have been involved in. By community I mean anything from a national or regional user group; a regular, geographically agnostic conference; a special interest group; even just a bunch of people who meet socially who share a common interest (such as London Oracle Beers which I help run). You could actually think of it as the world-wide collective of all such smaller Oracle communities.

I’ve thought about this a lot over the years and you can see my answer in the right. Quite obviously an Oracle community needs a shared interest in Oracle, in some aspect of it or a broader view. All tech communities focus on a brand of tech, I don’t think you get a “computers” community as it is just too broad. But the parts that make up the community are, I think, alwyas the same.

1) A large group of people willing to take part
2) A medium group of people willing to share
3) A small group of people willing to drive the community

Taking a regular conference as an example, the first group are the delegates. If not enough people are willing to pay for it and turn up then your conference will fail. The second group are the speakers and people who will help with organising. The third group are the ones who get the second group involved, manage the effort and sell the idea of the conference.

Community at UKOUG

That third, small group is the key. If you lack that, you have no community. Sometimes, especially for smaller groups, that third group could be very small, even just one person. Delegates and speakers can come and go but it’s not so easy with the drivers of a community.

For several years we had a small but active Oracle user group in the centre of the UK, in Birmingham. It was run by one person, Mike Mckay-dirden. He almost single handedly started it up, organised the venue and corralled some of us speakers into coming over to talk. It ran successfully for several years but then Mike decided he could not keep doing it. He stopped, no one took it over – and the community died.

With larger communities such as UKOUG or DOAG there will be several people driving it all forward and usually, if one drops out you can keep going until another driven person turns up to help. But it is always a very small group of people doing a hell of a lot of work.

Over the years I’ve watched some communities get stronger or weaker and even die off as those key, driving people change. You can tell who they are, they are the ones who look knackered all the time :-). The LOB is in danger of dying as a couple of the driving people are no longer around and I can’t get to London very often now.

The chances are that as you are reading this blog you are part of an Oracle community. If so, I’d encourage you to support the drivers in those communities. If you lose them, it could really badly impact your community. Would I encourage you to become one of those drivers? Well, I would. But you have to want to do it yourself – it’s a lot of hard work and sometimes it feels like none of the first and second group really appreciate what you are doing, which can be very demoralising. And it eats up a lot of time.

I went from being one of the large group willing to take part to a member of the medium group willing to share pretty quickly. After a few years I stepped up to being in the smaller group, for a couple of groups actually. I took those steps up because I wanted to, not with any real expectation of gain (I could see it was going to be me working “for free”!). But I am absolutely sure that I would not be where I am now if I had not. I would not be an OakTable member, I would not be an Oracle ACE Director, and I would not be a known international speaker if I had not at least joined the middle group. Joining the band of drivers introduced me to a lot of really nice, really helpful people too.

This blog has been all about Oracle communities but I think the three-group-theory might apply to all communities. I’ll have to think on that a little longer before I voice an opinion. One thing I do know – It’s really nice being part of communities.

Friday Philosophy – Smart or Smart-Arse? October 20, 2017

Posted by mwidlake in Friday Philosophy, humour, Perceptions, rant.
Tags: , , ,
1 comment so far

Many of you know what a “Smart-Arse” is. For those who do not…

A “Smart-arse” a person who is irritating because they behave as if they know everything or try to catch you out by misleading you.

A smart person will look at your problem and say something like “have you tried checking the array size?” and, 8 times out of 10, their input will help you solve your problem. It may not be THE answer but it makes you think about root causes.

A Smart-arse will say something more like “well, I would never have your problem as I would not have joined a company full of Java Nerds!!!”. Yeah, maybe that would have avoided my specific problem #1, but it is of no practical worth right now. .

You can usually pick out a smart-arse just by the tone of their voice. Think about the two situations above. The Smart person probably gave their advice in a quieter voice and with a passive or supporting manner. The Smart Arse person will usually have a higher, louder voice with a slightly sarcastic tone. Basically, in a superior or attention-seeking manner.

Another “Smart-arse” thing to do is to try to catch you out, in the misguided belief it makes them look cleverer than you.

In these situations always ask – “what is a Smart-arse hoping you won’t spot”

I’ll put my hand up right now. Sometimes, especially looking back on my past, I have been the smart-arse. (And, as humans, we hate the fault in others that we see in ourselves). And I bloody hate smart-arses. And I keep seeing smart-arse crap all over the internet. Let me give you an example. Look at the figure on the right.

This is the perfect example of the “Smart-Arse” question. You are faced with what looks like a simple logic puzzle and normally the tag line is something like “93% of people will get this WRONG!!! – Only Geniuses can solve it!!!!!!!”. They never cite a basis for the “93%” as it is as utterly made up and is as asinine and bloody annoying as whatever trick is in the post. What they are doing is giving you what looks like a genuine puzzle that needs a bit of thinking about but most of us can solve (though not you Dave, you really are an idiot). BUT! But they have hidden a detail. The are purposefully leading you astray so they can go “Aaa-Haaaa!!! Noooo! You forgot to check for the closed pipes!” (check tank 5 to 2). Or whatever the trick is.

This is “Smart-Arse”. It is not checking if you can solve a problem, if you are smart. It is checking if they can con you. Checking if they can give you a load of information and then go “Ahh HA!! Got ya!!! You did not check for the tiny bit of info we hid from you!!! O-hohohohho we are so clever!!!!”

Well, I have news for you, Smart-arse. You are a bloody idiot. Your answer is wrong, as any fool can see. (Bear with me on this…)

More boxes, same smart-arse shit

You may have seen other “tests” like this such as the one to the left – a bit more complex but the question is the same, which one fills up first.
In my head my response is always “which one fills up… *first*????”.

First! That is my response. Not which one but the fact that the question itself is wrong. It should be “which one fills up” full stop, as “any fool can see”. Not which one fills up first.

I better justify that claim.

Look at this second example, clearly labelled with the icon of utmost smarts Mr Einstein (who, I bet, could not plumb a toilet let alone all these pipes as, back in his time, there were no push-fittings – just copper and solder. I think he once said he was rubbish at practical tasks). They think the key “got ya” is that the pipe from C to D is blocked so water goes from C to J. And then from J to L, as the pipe to I exits higher than that to L. One sneaky trick and then a bit of good physics – it is not the input but the output that counts. So water pours into L and then to F – but not H as, again, a sneaky block has been inserted. So F fills up.

And only F fills up!!!

As as soon as it is full it overflows. It overflows below the height of any other buckets the fluid had flown through – and so no other bucket will fill. Their initial question is flawed. “Which will fill first” indicates one will fill second. No other bucket will fill second. The question is not logical! Bloody idiots.

I can’t say why I initially was struck by the fact that only one bucket would fill when I saw the first example of this, even before I spotted the blocked pipes, but we all think in different ways. It does not make me smarter, just different. I’m interested to see if any of you can point out a flaw in my logic above though as I have a sneaking suspicion I could still be wrong.

However, this is not the major flaw… (I told you that I was also an utterly insufferable smart-arse).

Figure 2 has a drip filling the A tank, figure 1 has a gushing tap filling tank 1. Now ask a simple question. No matter if the tap is gushing or dripping, can the pipe out of tank A (or 1) empty the water faster than the tap supplies it? Well, if the tap is dripping you would say “yes” – but if these tanks are 5mm cubed and the pipe out is less than 1mm thick then no! No scale is given. And in fig 1 the tap is gushing. Have any of you had a shower where the plug hole drains slower than the shower produces water? After 2 or 3 minutes your feet are in a shallow bath and if you keep the shower running it overflows into the rest of the bathroom.

With figure 1, the one with the gushing tap, my brain says that tank 1 will fill as the tap supplies water faster than it will exit through the pipe to tank 5. Tank 1 will fill and piss water all over the shop and whatever goes down the pipe to 5 will eventually fill that tank. Which of tanks 1 and 5 fills first is “it depends” (the classic answer to most I.T performance questions). The question is how much slower is the flow out of the pipe from tank 1 – if it is, on average, above half the rate of the tap flow then tank 5 will actually fill first. In any case, you have soaked the bathroom floor and the people in the flat below are banging on the front door…

With that new idea in your head, if you turn up the tap in figure 2 you can now see that which tank fills first is probably A or.. C – depending on the max flow out of the pipes (all pipes are the same bore so flow rate is the same, increasing header pressure in each tank as they fill allowing…) I think it might be C as it’s outflow is higher in relation to the tank top than B or C…

So depending on the tap flow rate, the drain pipe flow rate and the relative height of the clear output pipe it could be…. absolutely NOT the answer of the Smart-Arse original poster. That is the problem with smart-arses! They are so fixed on their clever “gotcha” answers that they stop thinking of the real world.

And don’t get me started on those images where bananas are added to cans of beer and divided by a plate of cakes, designed to look like some sort of Algebra test. Always they are being smart-arse. They try and hide the introduction of multipliers where all the first examples are addition, or you need to count the number of items, or yellow is 3 and green is 6, or it is in base 23. I was going to include an example (again, a really wrong one) but I’ll save that for another week when I am also in a bad mood.

And, of course, I am a “smart-arse” for pointing this all out. Did I say how much I dislike smart-arses?

I promise you, when you start looking for the smart-arse aspect to all those “are you smart enough” bollocks things on social media it just turns into so much blargh and you can either answer them easily or just decide you can’t be bothered being misdirected. And you can use that saved time for looking at funny kitten videos or, I don’t know, doing some productive work?

Is there any other relevance to your working life? Maybe. Next time your management structure asks you a seemingly benign question about what you are doing this weekend or when you think you are on leave (hang on, “think”?), or how minor will be the impact of a small change to how the business functions to the application you are developing – just switch on the bulb with “smart-arse” painted on it. They are asking you a question where they are expecting you to think in the clear, simplistic way most of us would. Now ask what the bloody hell they are up to.

Overloaded Indexes (for ODC Appreciation Day) October 10, 2017

Posted by mwidlake in database design, development, performance, SQL.
Tags: , ,
add a comment

ODC Appreciation Day is an idea that Tim Hall (aka Oracle-Base) came up with, to show out appreciation for the Oracle Technology Network (OTN)/Oracle Developer Community.

Fig 1 This is an efficient range scan

I want to show my support but rather than mention an Oracle “feature” I particularly like I’d like to mention a “trick” that I (and many others) often employ to help performance. That trick is Overloaded Indexes.

We can all appreciate that accessing data in a table via an index is a very good thing to do when we want just the few records for a given index key from the thousands or millions of rows in the table. As an example, we are looking up all the records for someone and we know their first name, last name and date of birth – a very common occurrence in things like hospital or billing systems. So our PERSON table has an index on those three columns. Oracle will read the root block of the index, read the one relevant block in each of the branch levels for the key, find all of the leaf block entries for that key – and then collect the relevant rows from the table. Fig 1 shows how we think of this working. i.e. most of the records we want to find will be close together in the table.

Actually, a lot of people who just “use” the Oracle database as a store of information sort-of think this is how an index always works. It efficiently identifies the rows that you want and that is the end of it. If the index is on the value(s) you are looking up rows for (say LAST_NAME, FIRST_NAME, DATE_OF_BIRTH) the index is ideal and that is as good as it gets.

Fig 2 – a more usual, less efficient index range scan

But in reality, the index lookup is often far less efficient than this and is more like fig 2. Working down the index structure to get all of the required index entries is exactly the same, but the rows you want are scattered all over the table. Oracle has to fetch many table blocks to get your data, maybe as many blocks as there records to be found. This is far from efficient.

So what can you do about this? You already have the “perfect” index, on LAST_NAME, FIRST_NAME, DATE_OF_BIRTH, the values you are looking up. Maybe you could add another column to the index to avoid those situations where there are many people with the same name and date of birth. But you may not have that extra information or it is simply not possible to identify the values in the table any more accurately, you really do need all the rows scattered though that table for the given search key.

There are “architectural” things you can do such as create the table as an Index Organised Table (see my little set of blogs about them starting here). You can also use various methods to group the relevant rows together in the table. But all of those methods are Big Impact. You need to recreate the table or plan for this eventuality up-front when you design the system.

But there is a very specific, easy thing you can do to address this particular problem, for the SQL statement you need to speed up. You can add all the columns your query needs into the index. This is an Overloaded Index.

An Overloaded Index holds not only the table columns in the WHERE clause but all the columns needed from that table for the query.

Why does this work? Because when Oracle identifies the range of keys for the key (LAST_NAME, FIRST_NAME, DATE_OF_BIRTH) all the other columns it needs are also in those index leaf entries and there is no need to get the rows from the table. All those lookups to the table are avoided. Fig 3 at the end of this article demonstrates this.

However, I’ll give you a real world example I had recently. A client had a SELECT statement something like the below, with the execution plan shown, and it was running too slowly for the business requirements:

WHERE   A.ACC_XYZ_IND      =:3
AND     A.ACC_ACCOUNT_NO   =:1             
AND     A.ACC_SUBACC_NO    =:2
AND     T.TRAN_P_IND       =:4 

| Operation                                 | Name         | 
|   0 | SELECT STATEMENT                    |              |
|   1 |  SORT AGGREGATE                     |              |
|   2 |   NESTED LOOPS                      |              |
|   3 |    NESTED LOOPS                     |              |
|*  4 |     INDEX RANGE SCAN                | ACC_PRIME    |
|*  5 |      INDEX RANGE SCAN               | TRAN2_3      |
       4740  consistent gets
       3317  physical reads

The index used on TRANSACTIONS is:

INDEX_NAME                   TABLE_NAME       PSN COL_NAME
---------------------------- ---------------- --- --------------
TRAN2_3                      TRANSACTIONS     1   TRAN_ACCOUNT_NO
TRAN2_3                      TRANSACTIONS     2   TRAN_SUBACC_NO
TRAN2_3                      TRANSACTIONS     3   TRAN_DLM_DATE

The index TRAN2_3 on the TRANSACTION table that you can see being used in the plan was for all the columns being used in the WHERE clause that actually helped identify the TRANSACTION records required – TRAN_ACCOUNT_NO, TRAN_SUBACC_NO and TRAN_DLM_DATE (the TRAN_XYZ_IND and TRAN_P_IND were always the same so “pointless” to index).

I added a new index to the TRANSACTION table. I added a new index rather than change the existing index as we did not want to impact other code and we wanted to be able to drop this new index if there were any unexpected problems. I added all the columns on the TRANSACTION table that were in the SELECT list, were in the the WHERE clauses even though they did not help better identify the rows needed. If there had been TRANSACTION columns in an ORDER BY or windowing clause, I would have added them too. So my index looked like this:

create index TRAN2_FQ on TRANSACTIONS

It is very, very important that the new index holds every column from the TRANSACTION table that the query needs.To prevent accessing the table, all the data the query needs for that table must be in the index.

The query could now satisfy the query by just using the new index, as the below explain plan shows.

| Id  | Operation                      | Name      |
|   0 | SELECT STATEMENT               |           |
|   1 |  SORT AGGREGATE                |           |
|   2 |   NESTED LOOPS                 |           |
|*  3 |    INDEX RANGE SCAN            | ACC_PRIME |
|*  4 |     INDEX RANGE SCAN           | TRAN2_FQ  |
         56  consistent gets
         52  physical reads

There is now no line in the plan for visiting the table TRANSACTIONS and we are using the new TRAN2_FQ index. The consistent gets and physical reads to satisfy the query have gone down from 4740 and 3317 respectively to 56 and 52. I think that is good enough.

Fig 3 shows what is happening. The new index is effectively a “mini IOT” designed to support the given query.

Fig 3 – Tables? Who needs tables!

There are of course a few caveats. The new index needs to be maintained, which is an overhead on all INSERT/UPDATE/MERGE/DELETE activity on the table. The index will only remove the need to visit the table for queries that are very, very similar to the one it is designed for – ones that use the same rows from the TRANSACTIONS table or a subset of them. If you alter the query you, e.g. select another column from the TRANSACTION table you would need to revisit this overloaded index.

Finally, be careful of modifying existing indexes to overload them to support specific queries. If the index is there to support referential integrity you need to think carefully about this and the modified index may be less efficient for other queries that used the original index (as adding columns to an index make it “wider”).

BTW if you think you recognise this from a recent Oracle Scene article then you would be right. I was pushed for time, I used something I had written before 🙂