db2top: Memory screen and db2mtrk (video)

Tweet Today’s video is a comparison between the output of the db2mtrk command and the db2top Memory screen. It covers current allocations, high watermarks, and maximum allocations for the instance, database, and application groups of memory pools as well as the repeat mode of db2mtrk. Watch “db2top: Memory screen and db2mtrk” directly on YouTube.

db2top: Buffer pool hit ratio (video)

Tweet Today’s video is a demonstration of buffer pool hit ratio in the Bufferpools screen of db2top. To produce a hit ratio of 100%, we query a single row repeatedly to perform logical reads with no corresponding physical reads. To reduce the hit ratio, we query more data than can fit in the buffer pool, […]

db2top: Regular expressions (video)

Tweet Today’s video is a demonstration of the regular expressions (regex) feature of db2top. In the video, I apply regular expressions to the Dynamic SQL screen to filter what SQL statements are shown. I demonstrate setting and clearing a regex, simple regular expressions, and POSIX extended regular expression metacharacters: Watch “db2top: Regular expressions” directly on […]

db2top: The Locks screen (video)

Tweet Today’s video is a demonstration of the Locks screen of db2top. In the video, I create a lock chain and launch db2top to examine the Application Status, Object Name, Locked By and Lock Count columns for three applications involved in the chain. I then use the Lock Chain screen to visualize the chain: Watch […]

How Inception is like metaprogramming

Tweet I saw the movie Inception over the weekend and after reading What a Programmer Sees When He Watches Inception, in which Marke Hallowell compared the dreams-within-dreams concept from the movie to a recursive function, I think I too see parallels between the movie and computer programming. I think a parallel exists between dreams-within-dreams and […]

Metaprogramming in SQL (Part 4)

Tweet In the past three posts, we have written metaprograms to create functions for comparing objects of built-in types, user-defined distinct types, ROW types, and ordinary ARRAY types. In today’s post, we will write a single metaprogram that can create comparison functions for all four.

Metaprogramming in SQL (Part 3)

Tweet In the first post in this series, I introduced the concept of metaprogramming in SQL using dynamic SQL and applied the technique to write a procedure that could generate comparison functions that compare two objects of any basic type. In the second post, I expanded the procedure to produce comparison functions that compare two […]

Metaprogramming in SQL (Part 2)

Tweet In the last post on this subject, we used dynamic SQL to generalize an integer comparison function into a stored procedure that builds comparison functions of any basic type. This served as a simple example, but did not really offer much benefit over using the ‘=’ operator. In today’s post, I will extend the […]

Metaprogramming in SQL (Part 1)

Tweet Metaprogramming can feel like magic. You call a function that you neither wrote nor imported from any library and, magically, it comes back with a result. Even more magical is how metaprogramming lets you do otherwise impossible things with your programming language. In “The Art of Metaprogramming”, Jonathan Bartlett’s developerWorks series, he lists three […]

db2top: The Watch feature

Tweet For the second video in this video series, we have a demonstration of the db2top Watch feature. It demonstrates capturing a single application’s SQL, capturing complete database structures to a set of files, and capturing all the dynamic SQL in the cache: Watch “db2top: The Watch feature” directly on YouTube.

  • Search