Daily Archives Friday, October 2008

count(*)

It’s quite surprising that I still see people arguing about the fastest way to “count the rows in a table”; usually with suggestions that one or other of the following queries will be faster than the rest:

select count(*) from tab;
select count(1) from tab;
select count(primary_key_column) from tab;

So here’s a simple test case that I wrote severall years [...]

Google Web Search RSS, Finally

Previously, I’ve listed the methods I use to keep track of all the information floating out in the ‘tubes.
One method I didn’t cover is using search, duh. I didn’t cover it because one glaring omission from Google’s web search has been RSS feeds for keywords.
If you’ve ever tried to monitor a keyword search over time, [...]

echo does not accept end of arguments signal

duplicate of echo does not accept end of arguments operator

addthis_url = ‘http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F10%2Fecho-does-not-accept-end-of-arguments-signal.html’;
addthis_title = ‘echo+does+not+accept+end+of+arguments+signal’;
addthis_pub = ”;

echo does not accept end of arguments operator

Let’s start with an example :

$ cat AI
#!/usr/bin/bash
while :
do
  echo "What's your name ?"
  read a
  if [ ! $a ]
  then
    break
  fi
  echo "Your name is :"
  echo $a
  echo
done
echo "Bye"

$ ./AI
What's your name ?
Jo
Your name is :
Jo

What's your name ?
Jack
Your name is :
Jack

What's your name ?
-e
Your name is :

What's your name ?

Bye

This artificial intelligence is not very intelligent, it cannot recognize [...]

ORA-600 ktagetg can’t be used for a DDL

Just a placeholder for futher investigation really.
So far been unable to prove my fledgling theory via an isolated test case, but if someone else gets this error, then this post might at least provide a possible resolution.
Background is that release scripts failed to create a materialized view at time T1 due to dependent object not existing, @ T2 [...]

Wellington to Auckland…

I woke up and went for a walk round Wellington CBD. When I got to the dock area I saw a helicopter city tours company, so I decided to go for it. Unfortunately they had a policy of a minimum of two passengers, so I had to pay double for the trip, but it was [...]

Fox Glacier to Wellington…

Day 6. The weather in Fox Glacier wasn’t good enough for a helicopter trip, so I started early for the ferry back to the north island. It’s a pretty long drive, so I thought I might struggle to make the last ferry, but as it was I managed to get there in plenty of time. [...]

Advanced Oracle Troubleshooting Guide, Part 9 - Process stack profiling from sqlplus using OStackProf

I have mentioned ORADEBUG SHORT_STACK command in my blog posts before - it’s an easy way to get and see target processes stack backtrace directly in sqlplus. No need to log on to the Unix/Windows server and use OS tools for extracting the stack.
I have also written few tools which allow you to post-process stack [...]