Pages

Friday, December 31, 2010

Oracle: Basic Performance Tuning

This is a one page list of simple guidelines to tune SQL without much DBA knowledge.
This is all you need to know to tune some reports from 2 hours (or more) to 20 seconds (or less). I have compiled this list during a report tuning assignment
where I achieved that kind of runtime improvements repeatedly.
There are many more tips but they tend to be more difficult to understand and there are many good books already written about this.
  • Understand the data. Look around table structures and data. Get a feel for the data model and how to navigate it.
  • If a view joins 3 extra tables to retrieve data that you do not need, don't use the view!
  • When joining 2 views that themselves select from other views, check that the 2 views that you are using do not join the same tables!
  • Avoid multiple layers of view. For example, look for queries based on views that are themselves views. It may be desirable to encapsulate from a development point of view. But from a performance point of view, you loose control and understanding of exactly how much task loading your query will generate for the system.
  • Look for tables/views that add no value to the query. Try to remove table joins by getting the data from another table in the join.
  • WHERE EXISTS sub-queries can be better than join if can you reduce drastically the number of records in driver query. Otherwise, join is better.
  • WHERE EXISTS can be better than join when driving from parent records and want to make sure that at least on child exists. Optimizer knows to bail out as soon as finds one record. Join would get all records and then distinct them!
  • In reports, most of the time fewer queries will work faster. Each query results in a cursor that Reports has to open and fetch. See Reports Ref Manual for exceptions.
  • Avoid NOT in or NOT = on indexed columns. They prevent the optimizer from using indexes. Use where amount > 0 instead of where amount != 0.
  • Avoid writing where project_category is not null. nulls can prevent the optimizer from using an index.
  • Consider using IN or UNION in place of OR on indexed columns. ORs on indexed columns causes the optimizer to perform a full table scan.
  • Avoid calculations on indexed columns. Write WHERE approved_amt > 26000/3 instead of WHERE approved_amt/3 > 26000.
  • Avoid this: SUBSTR(haou.attribute1,1,LENGTH(':p_otc')) = :p_otc). Consider this: WHERE  haou.attribute1 like :p_otc||'%'
  • Talk to your DBA. If you think that a column used in a WHERE clause should have an index, don't assume that an index was defined. Check and talk to your DBA if you don't find any.
  • Consider replacing outer joins on indexed columns with UNIONs. A nested loop outer takes more time than a nested loop unioned with another table access by index.
  • Consider adding small frequently accessed columns (not frequently updated) to an existing index. This will enable some queries to work only with the index, not the table.
  • Consider NOT EXISTS instead of NOT IN.
  • If a query is going to read most of the records in a table (more than 60%), use a full table scan.
  • Try to group multiple sub queries into one.

Beyond the Simple stuff ...
  • If you want to actually understand what you are doing, here are a few things that you need to start playing with:
  • Get into EXPLAIN_PLAN. There are multiple way of doing this. The less user friendly is to simply issue this in SQL*Plus: explain plan set statement_id = 'HDD1' for ;
  • Look at the trace from Oracle Reports. It tells you how much time it spends on each query. With r25: C:\ORANT\BIN\R25RUN32.EXE module=p:\old\bcmtrka1_hdd.rdf userid=opps/opps@new tracefile=p:\trace3.txt trace_opts=(trace_all)
  • Use the SQL Trace by issuing an alter session set sql_trace=true; then look at it with TKPROF .trc .lis sort=(EXECPU).

If you remember nothing else ...
  • Don't apply these guidelines blindly, EXPERIMENT: compare one method to another. Do NOT expect that one trick will work all the time.
  • Educate yourself: read, read, read. It SAVES time!
Reference: http://www.iherve.com/oracle/tune100.htm 

Tuesday, December 28, 2010

2010 in photos: BP and climate disasters


OILPOCALYPSE: The growing oil slick in the Gulf of Mexico is captured in this image from NASA’s (MODIS) instrument aboard the Terra satellite. This natural-color image acquired April 29, 2010 shows a twisting patch of oil nearly 125 km (78 mi) wide. Approximately 4 million barrels (170 million gallons) were released overall. (NASA Earth Observatory/Jesse Allen/University of Wisconsin SSEC)
The headlines of 2010 were driven by fossil fuel disasters — involving the dangers of extraction or the biblical might of the climate they have polluted. Hundreds of thousands of people died in climate disasters, and hundreds of millions more affected by floods, droughts, storms, and wildfires. Below is a small selection of the most striking and iconic news photography of 2010, from the BP disaster to the Pakistan floods, from Wonk Room’s Brad Johnson.
Meanwhile, polluters successfully blocked enactment of climate policy or oil industry regulation in the United States, as the Obama administration advanced health care reform and other legislative priorities.

OILPOCALYPSE: In this aerial photo taken in the Gulf of Mexico more than 50 miles southeast of Venice on Louisiana’s tip, the Deepwater Horizon oil rig is seen burning Wednesday, April 21, 2010. Eleven men working on the platform were killed, and 17 others injured. (AP Photo/Gerald Herbert)

Friday, December 24, 2010

What is the difference between Linux and Unix?

Linux and Unix 

Unix is popular operating system, developed by AT&T in 1969 and it has been very important to the development of the Internet. It is a multi-processing, multi-user, family of operating systems that run on a variety of architechtures. UNIX allows more than one user to access a computer system at the same time.
A widely used Open Source Unix-like operating system kernel. Linux was first released by its inventor Linus Torvalds in 1991. Combining the Linux kernel with the GNU software forms the basis of the operating system family generally known as 'Linux'. There are distributions of GNU/Linux for almost every available type of computer hardware from desktop machines to IBM mainframes. The inner workings of GNU/Linux are open and available for anyone to examine and change as long as they make their changes available to the public, as set out in the terms of the GNU General Public License. Because of its robustness and availability, Linux has won popularity in the Open Source community as well as among commercial application developers.
Here is more input:
  • Unix requires a more powerful hardware configuration. It will work in large mainframe computers but will not work in an x86 based personal computer. Linux however, (which is built on the concept of Unix) has small hardware requirements and it will work on both a large mainframe computer and an x86 based personal computer.
  • Unix is an Operating System developed in olden days in which the kernel, the heart of the OS, interacts directly with the hardware. (note: this is the definition of what a kernel is). Because UNIX treats everything as a file, it provides greater security for users. An example of a UNIX distribution is posix. (note: actually POSIX is a set of standards for interoperability of applications between UNIX and UNIX-like systems). Linux uses a the UNIX architecture as its basis and provides more facilities and applications. Linux could be considered to be a GUI to the UNIX core. (note: this is plain wrong. GNU/ Linux was rewritten from scratch using UNIX as a guide. GNOME and KDE are GUIs for GNU/Linux). Examples of Linux distributions are Redhat, Fedora, Susee, Mandriva, and Ubuntu. Solaris OS also uses the UNIX kernal almost all UNIX commands will work on solaris in addition to 500 Solaris specific commands. (note: Solaris is also a rewrite of UNIX for x86, and does not use any original UNIX code). Both UNIX and LINUX are Open source. (note: UNIX is proprietary, Linux is open source)
  • Unix is the foundation for a number of operating systems, with Linux being the most popular one. Novell and Free BSD are 2 other commonly used Unix varients.(note: Again, the BSD family are based on another rewrite of UNIX for x86, UNIX is not their foundation in the sense implied here)
  • UNIX is an operating system created in the early days of computers. More recently, Linux was created as an open-source, freeware operating system. (note: Linux is free software, not freeware. Free software is open source that insists any developer reusing code releases their own work as free software. Freeware is proprietary software distributed at no cost [gratis]) It is "UNIX-LIKE", meaning that it uses many UNIX constructs but also departs from traditional UNIX in many ways. Like UNIX, Linux is faster than many of the other commercially available operating systems. (note: This is a sweeping generalization and depends on the hardware used, and what servers and applications are running) It appears to also be far more robust than any of the Microsoft products. Linux is being used in many time critical applications because of it's speed. It is also used in many applications that need to maintain uptime because Linux, like UNIX, can run for months at a time without rebooting. While the typical method of solving Microsoft problems is to "reboot", that particular requirement does not seem to be appropriate in a Linux/Unix environment. While UNIX has created a windows-like work environment, Linux has improved greatly on that concept. Linux has become a real player in the consumer operating system market... and it's free. While you may want to pay for a Linux distribution, the actual code is free and you are allowed to load it on as many machines as you want. You can get Linux for free if you wish to load it across the internet. 
Some other way to express difference 


Unix :
A Operating System developed in olden days in which kernel interacts directly with the hardware.kernal is consider to be heart of this os.
In this Operating system everything is considered as a file,provides greater security.
Ex: posix
Linux :
Linux is an Operating system which use unix as its base and gives further more facilities and applications.
Merely speeking GUI is made in linux having unix as its core.
Ex: Redhat, Fedora, Susee, Mandrake . . .
Solaris OS also using the same unix kernal all the unix commands will work on solaris and have 500 more solaris specific commands. Differnent organizations used the UNIX kernal and added their own essence to form their own version of linux.
Both UNIX and LINUX are Open source


Friday, December 3, 2010

What Is GPRS and How GPRS Works? (GPS vs GPRS)

This article will discuss the technology behind GPRS to help give you a better understanding on how GPRS works.

GPS vs GPRS

GPS and GPRS are far different when it comes to functionality even though there's only one letter that differ. As a technology, GPS stands for Global Positioning System which can track different sites on Earth as it receives data from satellites, while GPRS connects with the cell sites for signals to provide service for cellular phones.

So what does GPRS stands for?

What is GPRS?


GPRS stands for General Packet Radio Service. It is a non-voice wireless Internet technology that is very popular due to the fact that it can support both phone calls and Internet data transmission. Some GSM, or Global System for Mobile Communications, mobile phones can even handle both phone communication and Internet access at the same time. It transmits data packets on GSM systems where cell phone channels are shared.

How Does GPRS Work?

In GSM cell phone systems, there will always be idle radio capacity. This is the capacity of a network provider that is not being used and it stays unused until other cell phone users decide to make phone calls. GPRS uses this idle radio capacity to establish a data network to be used for data transmission. If a network provider's idle radio capacity decreases, which means a lot of phone calls are being serviced, data transmission and speed decreases as well. Cell phone calls have a higher priority than Internet data transmission in cell phone network providers.

Packets

Due to its packet-based nature, which means it transmits data as a series of data packets routed through multiple paths across a GSM network, GPRS does not require a network to have continuous data transmission. This data transmission can share network radio channels easily and efficiently. These network radio channels have 8 time slots each and their maximum data transmission is 13.4 kbps. Every time slot that is not being used can be used by GPRS to transmit data packets. In a best case scenario, user can experience a GPRS data rate of approximately 170 kbps per network radio channel. In this scenario, only data transmissions are using the network channels without voice calls hogging the network.

Radio Channels

A GSM radio transceiver uses time division multiplexing to make 8 time slots possible for each radio channel. These channels are used by cell phone users for voice calls and data transmission in maximum effect if conditions are right like if there is no interference from nearby GSM cell towers, there are enough radio transceivers and there is a strong radio infrastructure. GPRS uses idle capacity in these radio channel time slots to accommodate data transmission.

How Does GPRS Work to Optimize Bandwidth?

When multiple channels are being used by voiced calls, GPRS combines these channels to make use of the unused capacity. This joining of multiple voice channels gives users higher bandwidth for data connections. The number of channels and the amount of capacity of a cell phone network remains the same but the bandwidth can now be allowed to reach its full potential by servicing both voice calls and data transmission all at the same time using the same channels.

GPRS technology is an elegant solution for network providers to offer additional services with minimal effort. Cell phone network providers only need to set up a few new infrastructure nodes plus some software upgrades while still using their existing GSM network infrastructure to add an overlay GPRS network to their cell phone service.

Reference: http://www.brighthub.com/electronics/gps/articles/73072.aspx

Wednesday, December 1, 2010

Seagate's New 3 TB External Drive




















Not so long ago, well, maybe 15 year, but that's still not so long, a 1 GB hard drive was a real luxury. Heck, I can remember trying to decide if I should spend the extra money to upgrade to a 512 MB hard drive not so long ago. Now computers come with 4 GB or RAM alone, and storage is off the charts.

Thursday, November 25, 2010

November 26th This day in History

November 26th
What Happened on This day in History




Egypt
1922 Egypt King Tut's Tomb

26th November, 1922 : The British Lord Carnarvon and the archaeologist Howard Carter enter King Tut's tomb which had been buried by the sands of the Egyptian desert for thousands of years before its discovery by Carter a few days before, He had waited until his partner Lord Carnarvon could fly from England to enter. Many believe to this day that King Tut's tomb is the greatest archaeological discovery of our time as it had not been discovered earlier as many tombs has and plundered of it's fantastic treasures. Both of these great men died within 7 months of entering the Tomb which helped to perpetuate the myth of the ( Mummy's Curse ) .





U.S.
1942 U.S.A. "Casablanca"

26th November, 1942 : "Casablanca," set in the Vichy-controlled Moroccan city of Casablanca during World War II, starring Humphrey Bogart and Ingrid Bergman, has its world premiere at the Hollywood Theater in New York. The movie goes on general release in January the following year. The film was nominated for eight Oscars and wins 3 Oscars including Best Picture.


Wednesday, November 24, 2010

Dancing With The Stars 2009 Winner Donny Osmond - 1st Dance

Dancing With The Stars 2009 Winner Donny Osmond - 1st Dance










If you want to dance like the winner of Dancing With the Stars 2009 Donny Osmond!
This is the best self-coaching course around, check it out to become the next Dancing With the Stars Winner!

Tim Burton's Vincent

It was made on 1982. Enjoy it.





The Official Tim Burton Website,Tim Burton, Tim Burton's Art
www.timburton.com


Edward Scissorhands (Trailer)
A Johnny Depp-Tim Burton film. 1990


Michael L Brea

http://goo.gl/y2XTV michael brea ugly betty Michael Brea has been taken into custody for as brutal a crime as we can possibly imagine: the actor allegedly chopped off his mother's head with a sword.







Click our link http://bestmoviesnews.com/?p=69/ to watch Ugly Betty' Actor Suspected of Murdering Mother With Samurai Sword video free

Ugly Betty actor Michael Brea, took a sword to his mother this morning after yelling at her to "repent!" Some sources report that Brea actually decapitated his mother. Brea was an aspiring actor and once played a small part in the Ugly Betty sitcom.


Thursday, October 14, 2010

Microsoft NetMeeting in Windows XP

NetMeeting is a standard XP component that's hidden until you initially configuration. NetMeeting lets you participate in virtual meetings, work in shared applications, share data over the Internet or an intranet, and share live video with others in far-away places.
To enable NetMeeting, perform the following steps:
  • Go to the Start menu and select Run.
  • Type Conf and click OK.
  • After the NetMeeting configuration wizard starts, click Next.
  • Enter your personal details and click Next.
  • Select listing directory options and click Next.
  • Select your connection media and click Next.
  • Configure the shortcut options to your liking and click Next.
  • Click Next to configure volume options and Next again to confirm that the microphone works.
  • Click Finish.
To begin a NetMeeting session, start NetMeeting (e.g., run conf.exe again to start the application or select the appropriate shortcut from the Start menu or desktop), click the Phone button, and enter the IP address of the machine you want to communicate with.

Friday, April 9, 2010

Uninstall .Net Window Service

here is command for uninstall .net window service.

C:\Program Files\Microsoft Visual Studio 9.0\VC>installutil/u "physical path of service .exe file"