Thursday, May 27, 2010

Result_cache

Result_Cache is a new feature in 11g using which we can store the results of a query in SGA. We can define deterministic functions also using the result_cache keyword. Here is a nice reference which gives a small example of how result_cache really works.

I came across the result_cache in one of the questions I was answering for plsqlchallenge.com . My rank naturally stumbled becasue of the fact that I did'nt know anything about how to use the result_cache in a function. Good thing is that now I know it.

Tuesday, May 25, 2010

Translate

I was answering this question on plsqlchannel.com yesterday. I was way too confident that my answer was correct that I clicked the answer without giving it even a second thought. It was only when I saw my rank drop a whopping 30 points that I noticed the blunder that I did. The first blunder is that I should have cross checked my result once before submitting. Cause getting it right is more important that getting it faster. This is one thing that I have to relearn and hopefull teach my daughter. And the second is that I did'nt know that TRANSLATE always needs all the three arguments as not nulls. If anyone of them is a null then the result would be a null.

I was under the impression that TRANSLATE('ABCD','BCD','') would simply replace the 'BCD' with the '' and the reuslt would be 'A' . But I was utterly wrong. TRANSLATE would not do this. There is another function for this kind of a thing and we need to use REPLACE for that. REPLACE('ABCD','BCD','') would give the result of 'A'.

One thing to learn today. Actually two things. One in Oracle and one in Life. Get it right not just fast.

Monday, May 10, 2010

The Audacity of Hope - Book Review

Today I officially completed the book "The Audacity of Hope " by Barak Obama. I brought this book while I was traveling to Pune in Hyderabad airport. I was pleasantly surprised to see that book in Hyderabad. The book was priced at Rs.250 which I thought was a pretty good deal for a book in an airport.

The book definitely is a good read and a very pleasant one for that. I think for me it was my first introduction to American history and the amazing things that this country has in store for itself and for the whole world. Being an immigrant in this country and that too an unwilling one I had trouble adjusting to American way of living and the way things work in here But once I started working I think I have started realizing the good sides of it. And reading "The Audacity of Hope" really made me appreciate the american way even more. What is more endearing to me is the realization of the inherent flaws of humans and still striving to make this world a better place. And the way Obama writes his thought, it seems like its a no brainer. What is to be appreciated is the blatant frankness of the author in admitting the flaws that American ways have inflicted on foreign soils.

Reading the way in which Obama explains some of the points from the American Constitution, I envied all those students who got to listen to him really teach about American Constitution in his classes. Of course I know I would be worst fit in such a setting, but even then what is wrong in dreaming..

What is more interesting to me personally was the last chapter in which he talks about Family and his Family in particular. The relationship he has with Mitchel and how she manages and juggles as a working woman and a mom. Being a working mom myself I did identify very much with many of the feelings Obama says Mitchell Obama goes through, like feeling not good enough as a mom and at work. I am sure there is no reason for Mitchel Obama to feel that way but I definitely for one feel that way so many times. But reading this book has given me a new perspective of looking at things and made me realize that I am not alone and there are hundred of people who feel like me. And what I am doing is the best for my kids and my family,

Obama is a great writer and thinker. He has a uncanny way of connecting with people through his books. I can'nt wait to read his first book "The dreams of my father".

Tuesday, May 04, 2010

Open Command Prompt from any folder.

Follow this link to open command prompt from any folder.