To eliminate any confusion – I am not Ember. Ember is a little shorter, with a big smile, and glasses. I was lucky enough to meet her through a mutual friend at the IDUG 2012 Conference in Denver just a few weeks ago.… Read the rest
Continue reading »Tag: SQL
VARCHAR: Friend or Foe
I read an article from Craig Mullins on “Working with variable data“. The rest of this post is going to assume you’ve read it, so click through and then come back.
I’ve seen performance issues caused by VARCHAR before, and Craig makes some interesting points.… Read the rest
Continue reading »db2caem – Get Actual Row Counts in Your Explain Plans
Edit 2019-04-02: corrected typo in the explanation of the -tbspname option. Also, a colleague notes that a 16K page size table space also works for this.
db2caem is a tool in 9.7 that reports actual row counts in your explain plan alongside your estimated row counts.… Read the rest
Continue reading »More advanced SQL analysis
So the basics of analyzing SQL on db2 are in my post on Analyzing SQL. I wanted to go a bit beyond the basics.
First, you have to be able to read an explain plan. A couple of resources on that:
http://web.archive.org/web/20040603042937/http://www.idug.org/idug/member/journal/Nov01/articl05.cfm… Read the rest
Continue reading »The basics of Index Design for DB2
The keyword in the title of this post is “basics”. I spend some time training SQL Server or Oracle DBAs on DB2, and so this is the answer on the most basic level to how to identify indexes to add. There are certainly greater experts on this topic than me, so I don’t claim to have a comprehensive view on Indexing.… Read the rest
Continue reading »SQL Analysis Overview
So I thought I’d do a short series on analyzing SQL. I want to focus on some of the techniques I use, so not necessarily everything you could know about it, but some basics on one way to do it.
Identifying Problem SQL
Many DBAs have their own methods and approaches in this area, but there are some basic sources and methods that I use. I’ll cover at least the basics of SQL analysis in one or more future posts
Get SQL from Developers
So the optimum situation is that your developers give you the SQL they’re planning to use in custom code (or better yet, they have a dba write it in the first place).… Read the rest
Continue reading »Top 10 tips for SQL performance on DB2
Ok, so everyone has their top 10, and some of them are significantly different – but here’s my top 10 on SQL performance for DB2. I mostly share this information with developers, but it’s important for a DBA to be aware of these things.… Read the rest
Continue reading »What are Parameter Markers?
Parameter Markers
Parameter Markers show up as ? in queries when you look at them in a dynamic SQL snapshot or in the sysibmadm views. They show up when the value for a variable is not hard-coded at the time of preparation, but instead is changeable at execution time.… Read the rest
Continue reading »