Using Python to connect to Oracle DB, and extract results to CSV

I knew it would’nt take much code to do this, but there was still a little fiddling around and some odd errors along the way. Anyhow if you want to do this here is some helpful tips
Continue reading “Using Python to connect to Oracle DB, and extract results to CSV”

Eliminate database caching from skewing your performance test results

If you repeat the execution of short, say 1 hour bursts, of performance tests, you run the risk of skewing your performance results as a result of database caching. This can happen, as we often want to repeat a test utilising the same data, for baselining and then comparison benchmark runs. Using the same data in repeated tests may retrieve data from the database internal cache, reducing or even eliminating disk reads, which can give better preceived performance results.

Continue reading “Eliminate database caching from skewing your performance test results”

Oracle timestamp difference SQL

Often in performance testing we need to get processing times of transactions which have been timestamped in a log somewhere. This usually entails multiple log entries for the same transaction which have been processed for in and out entries. Consider timekeeper entries for example, employees clocking in for work and out of work multiple times thoughout the day. Read on for an example SQL that can be helpful

Continue reading “Oracle timestamp difference SQL”

Using Oracle PL SQL to bulk load XML

In performance testing it is often necessary to do bulk loads of data into databases via XML payloads, to prepare for a test. For my example I had to load 250,000 elements via XML to create accounts. The XML structure had one root or top level element with many child elements, also many batches of the root elements. I decided I would perform a commit after constructing each root element, with the corresponding amounts of child elements. I made both the batch number of root elements and the child elements both configurable. This resulted in the following PL SQL code. I have deleted out certain parts of the XML so as to protect client.
Continue reading “Using Oracle PL SQL to bulk load XML”