Monday, March 26, 2007

Gather statistics for a given oracle session

Gather statistics for a given oracle session

alter session set tracefile_identifier=''; 
-- should be replaced with your own identifying name...
alter session set events='10046 trace name context forever, level 8';
set timing on

PerlTips - 1

to escape particular characters in a given variable $var ->
$var =~ s/([CHARLIST])/\\$1/g;

(http://www.unix.org.ua/orelly/perl/cookbook/ch01_14.htm)

The complete Perl Bookshelf

http://www.unix.org.ua/orelly/perl/index.htm

Tuesday, March 13, 2007

Delete Statistics from a Schema

-- delete all statistics
DECLARE
CURSOR cOwner IS SELECT DISTINCT owner
FROM dba_tables
WHERE owner NOT IN ('SYS','SYSTEM','DBSNMP',);
BEGIN
-- analyze sOwner,compute
FOR rOwner IN cOwner LOOP
DBMS_STATS.DELETE_SCHEMA_STATS
(ownname => rOwner.owner);
END LOOP;
END;
/
select 'END_DATE: '||to_char(sysdate,'dd.mm.yyyy hh24:mi:ss') as end_date from dual;
exit

Gather statistics for a schema

-- recreate all statistics
DECLARE
CURSOR cOwner IS SELECT DISTINCT owner
FROM dba_tables
WHERE owner NOT IN ('SYS','SYSTEM','DBSNMP',);
BEGIN
-- analyze sOwner,compute
FOR rOwner IN cOwner LOOP
DBMS_STATS.GATHER_SCHEMA_STATS
(ownname => rOwner.owner,
estimate_percent => 99,
block_sample => FALSE,
method_opt => 'FOR ALL COLUMNS SIZE 150',
degree => NULL,
granularity => 'DEFAULT',
cascade => TRUE);
END LOOP;
END;
/

select 'END_DATE: '||to_char(sysdate,'dd.mm.yyyy hh24:mi:ss') as end_date from dual;
exit

Wednesday, January 17, 2007

Culture ambassador

Got two colleagues at home for tea, after office.

It was fascinating experience. The discussion was very interesting, my wife joined the discussion as well.

Somehow, it turned towards the culture and cuisine discussion. The thing is, with me and her together with europeans, it always happens, without fail. The discussions always tend to turn towards the people and the place.

We talked of various things, how is this particular dish prepared, hows that done. I think the understanding of people about Indian cuisine is spreading fast. People do know about it, and it amazes me as to how much do they know on their own. About spices, the way Indian fooding habits are, the reasoning of eating such food and all that.

Sometime, we feel that people like us, who travel away from their home and live in other countries for work etc, have another role to play other than being regular "foreginers" in that country. The very fact that we are from our native country there, bestows us with the responsibility of representing our country there.

I cant say whether or not we fulfilled that responsibility I just mentioned, but I feel that we should do that. Thats a much truer version of culture spreading to other lands, better than films, sponsored promotions, delegations etc.

Personally, I like talking about my culture, gives me a sound platform to tell them, "Guys, look at me. I am from India. A developing country, managed to do as much as you see in 50-60 years, which your western countries have been able to do in few hundred years." That sort of feeling makes me so proud, I love that.

Love India.

Tuesday, January 2, 2007

long New Year Weekend...

Wow...
absolutely fantastic...

It was the last resort option that we had... to celebrate the new year eve out of our apartment...not really being on our own. And that choice turned out well.. Well.. it turned out "Best New Year" celebration that we have seen... or rather if would limit it... the best fireworks display we have ever witnessed.

We went to Zurich, about 15 minutes from here... and were treated with this wonderful fireworks display on Lake Zurich for more than 30 minutes...

They were launching the fireworks from somewhere in the middle of the lake and the whole city had their lights switched off.. to create the best dark background possible for this. It felt like everybody was waiting for this only.

It had all the elements in it, perhaps... the color of life at best. We saw all colors that we could expect from a fireworks display. I have seen one in Brussels (a new year celebration fireworks display) but this one was class apart. The very idea of staging it from middle of the lake was THE thing, in my view. The reflection and enlightening of the water surface as the fireworks did their job... was outstanding.

They started it with a giant ( I really mean GIANT ) firework combination at dot 12 midnight. To mark the change of year. And then they waited for 15 minutes... why.. don't ask me.

Those 15 minutes passed by no easy. It started getting colder... by the moment... since we were by the lake, we were facing the cold wind. To add to the cold, rain came in. We did not really go 100% prepared and therefore, had to arrange a few polythenes to cover her head. It was fun.. and trouble mixed all over. We did not want to leave the spot, but the cold was not allowing us to hold on to our cameras ( We went prepared with a Canon EOS350D and a Sony HC30E).

But when they started after 15 minutes, it beat everything. All the cold, all the wind, everything was forgotten in the pleasure shock of the display that we were to witness. The rain, wind, the cold, everything gave way to pleasure and sounds of ohh.. wow.. marvellous...great...its the best... etc.. and etc..

I would add a few photos to elaborate my feelings a bit...

Hope everybody enjoyed the new year start in similar ways...

A very happy new year to all the readers...

Some of the photos from the celebration (whatever we could capture while enjoying the show ourselves...) is available on this album.

From New Year 2007

Saturday, December 16, 2006

Apartment Blues... finished

finally...

finally...

the search is now over and i am now writing from our new apartment. In this city/country nothing is easy. start from looking for a flat to planning a visit to signing the contract to moving in... all steps include much more than i have previously seen in at least two countries in Europe. Really... Its not simple.

then there are these microsoft guys... god help me from them... but the xp home edition service pack 2 is just unthinkable.... the people from Mcafee are not far behind.

in the name of virus protection, they load your system with so much stuff, that normal things can't work anymore. I am seriously thinking about asking them to refund my payment for their internet security suite...