November 2014

12.1.0.2 Introduction to Zone Maps Part III (Little By Little)

I’ve previously discussed the new Zone Map database feature and how they work in a similar manner to Exadata Storage indexes. Just like Storage Indexes (and conventional indexes for that manner), they work best when the data is well clustered in relation to the Zone Map or index. By having the data in the table […]

Baselines

I’m not very keen on bending the rules on production systems, I’d prefer to do things that look as if they could have happened in a completely legal fashion, but sometimes it’s necessary to abuse the system and here’s an example to demonstrate the point. I’ve got a simple SQL statement consisting of nothing more than an eight table join where the optimizer (on the various versions I’ve tested, including 12c) examines 5,040 join orders (even though _optimizer_max_permutations is set to the default of 2,000 – and that might come as a little surprise if you thought you knew what that parameter was supposed to do):

Webinar Followup (Nov. 12) - In Search of Plan Stability - Part 2

Sorry for the delay in getting this posted, but thanks to everyone who attended my November 12th webinar entitled In Search of Plan Stability - Part 2. You can download the presentation materials from these links:

Presentation PDF
Recording

#DOAG2014 bits of info for DBAs

Just wanted to share some pieces of information from the recent DOAG annual conference that you may find interesting.

From Mike Dietrich’s presentation about Database Upgrade:

Mike Dietrich

Database Replay is extremely useful to predict after-upgrade performance on a test system,

especially we can record the production load on 10g even.

From Carsten Czarski’s talk about XML DB:

Carsten Czarski

Parallel Costs

While creating a POC of a SQL rewrite recently I received a little surprise as I switched my query from serial execution to parallel execution and saw the optimizer’s estimated cost increase dramatically. I’ll explain why in a moment, but it made me think it might be worth setting up a very simple demonstration of the anomaly. I created a table t1 by copying view all_source – which happened to give me a table with about 100,000 rows and 1117 blocks – and then ran the query ‘select max(line) from t1;’ repeating the query with a /*+ parallel(t1 2) */ hint. From 11.2.0.4 here are the two execution plans I got:

Why is “Dave Unknown” Trying to Social Media With Me?

I know some people share my opinion on this and others totally disagree – but I fail to appreciate why people I have never met, spoken with or care about want to Social Media with me. If we have not met but there is a high probability we share unusual interests then OK, perhaps – but the fact that we both can spell Oracle or know what a gene is does not count as unusual shared interests. Maybe I am just too old to “get it” or just too grumpy to appreciate their efforts.

Conference Organisation from the Inside – UKOUG Tech14

An interesting experience I have had this year is being more involved in helping organise the annual UKOUG Oracle Technical Conference – Tech14. I fully intended to blog about things as we progressed, but it never happened got going so I did not.. But I thought it would be interesting to do a couple of blogs about it now, for anyone interested, as the conference itself approaches.

If you have never helped organise a conference or user group meeting then you probably think there is not a lot of work involved. You would be quite wrong. If you have been a volunteer at one, as in you have presented or chaired sessions, then you will have more understanding – but still probably fall short of the mark in estimating the effort involved. There is a lot involved.

Quantum Data

That’s data that isn’t there until you look for it, sort of, from the optimizer’s perspective.

Here’s some code to create a sample data set:


create table t1
as
with generator as (
	select	--+ materialize
		rownum id
	from dual
	connect by
		level <= 1e4
)
select
	rownum					id,
	mod(rownum-1,200)			mod_200,
	mod(rownum-1,10000)			mod_10000,
	lpad(rownum,50)				padding
from
	generator	v1,
	generator	v2
where
	rownum <= 1e6
;

begin
	dbms_stats.gather_table_stats(
		ownname		 => user,
		tabname		 =>'T1',
		method_opt 	 => 'for all columns size 1'
	);
end;
/

Now derive the execution plans for a couple of queries noting, particularly, that we are using queries that are NOT CONSISTENT with the current state of the data (or more importantly the statistics about the data) – we’re querying outside the known range.

The Myth of Great Places to Work

Why do people have this crazy obsession of working for a specific company, or the perception that a company is great or not so great? People—especially those immediately around you—make up a huge part of the attractiveness of a company to work for; not companies themselves. Consider these factors first before you choose one to be a "dream" company.

It's not the traditional blog post I generally write. But it's something I consider near and dear to my heart; so I thought I would do it anyway.

Comparisons

“You can’t compare apples with oranges.”

Oh, yes you can! The answer is 72,731,533,037,581,000,000,000,000,000,000,000.