When a single index has multiple columns that are indexed, it is called a composite or concatenated index.

Prior to the introduction of skip-scan functionality, queries could only use the index if the leading column of the index was used in the WHERE clause. Consider the example in the following listing where the EMP table has a concatenated index on Empno, Ename, and Deptno. Note that Empno is the first part, Ename is the second part, and Deptno is the third part. If you are not making use of the skip-scan functionality, Oracle will generally not use this index unless your WHERE clause specifies a value for the leading column (Empno).

select job, empno
from emp
where ename = 'JAY';

Since Ename is not the leading column of the index, the optimizer may elect not to use the index. With the introduction of the skip-scan functionality in Oracle 9i, the optimizer may choose to use the index even though an Empno value is not specified in the WHERE clause. Instead, the optimizer could choose to perform a fast full scan of the index or a full scan of the table.

The same holds true if the third column of the index is used in the WHERE clause:

select job, empno
from emp
where deptno = 30;

In this listing, the WHERE clause specifies a value for the third column in the index. The optimizer may select to perform an index skip-scan access, an index fast full scan, or a full table scan. By creating the index, you have given the database more choices to consider when executing the query, hopefully improving the overall performance. Note that the user’s code does not change; the optimizer is aware of the index and bases its decisions on the anticipated cost of each alternative.

Niemiec, R. J. (2007). Oracle Database 10g Performance Tuning Tips & Techniques: Oracle Press.

I’d always used pushd to store the location of working directories when writing bat scripts. I didn’t realise that you could also use the pushd command to access unc paths:

This command creates a new drive for the share. You can use popd to remove the drive association with the UNC share.

Here’s some PeopleCode I wrote that will add a carriage return and line feed to the end of a String if it is not empty:

or as a method:

Note: This assumes that you want Windows line endings. Typically unix line endings just have a single line feed (Char(10) with no carriage return.

A colleague was having trouble with his Windows XP network connection on his Dell laptop after coming back from China. He was able to access the local intranet at work but could not access the internet. I’d never experienced this before. We tried the usual sorts of commands to renew the ip (eg. ipconfig /release and ipconfig /renew). None of these would work. Even after re-installing windows he still wasn’t able to connect to the internet!!

The last resort was to ring up Dell support. They suggested to run the following command:

This fixed the problem.

This command resets the Winsock catalog to the default configuration. The fact that even after re-installing Windows that the network wouldn’t work suggests that this issue was hardware/firmware related.

Experts exchange states that this command can be useful when a malformed Winsock Layered Service Provider (LSP) is installed that results in loss of network connectivity. But they also advise that while this command can restore network connectivity, it should be used with care because any previously-installed LSPs will need to be re-installed.