Get Affordable E-Commerce Solutions With Web Development And Design Companies



If you have any plan to start an e-commerce business, first and foremost thing is that you must have an idea how and from where it must be started and what are the steps needed in order to make it a successful one. E-commerce business success is laid with the websites. Here your websites must be very creative and professional so that it grabs the attention of the target audiences with a glimpse of an eye. Otherwise your customers will move to the other sites available, that their eye catches. So in order to bring them to your particular sites your websites must have the capability to hit the audience’s eye at a glimpse.

If you face any problem you need not have to worry because, for your own benefit Web design and Web development companies are there to help you with affordableecommerce solutions to make your websites more creative and attractive which will lead you to the zenith to attain the best satisfaction. The developers will never let you down, as they have got several years of experiences working with different projects and have the potentiality to solve any problems undertaken by them that will bring maximum benefits or the best outputs to your company. They will deliver their work on time and will satisfy your clients and customers all around. There are many advantages or benefits of hiring these web developers and designers. 

Some of them are-
        It helps You to get direct control over your project
        It will save the cost of staff, equipments and technology and will be very cost effective
        Skilled professionals working with different typical projects
        Risk mitigation
        On time completion of project undertaken by them
        Will provide Technical support to help you throughout your way
        Prompt and direct communication
        Provides highly scalable solutions

Qualities That Helps You To Hire A Best Wordpress Designer

Everybody wants to make their websites outstanding and attractive to attract more visitors online and do the best e-commerce business. But they don’t have any idea how to design their websites and give it a professional look. But for their concern, there are many Wordpress design companies available in today’s market that provides WordPress designers for hire at your own affordable price that you may have never dreamt off.

WordPress is considered as one of the most popular blogging on the internet in today’s world. It is a free open source blogging tool and a content management system based on PHP and MYSQL. It contains features that include plugins and a system of creating templates. It allows one to have a website and a blog at a time. There are many benefits of hiring a Wordpress designer. It brings peace in your mind. You don’t have to worry about which plugins or theme is the best that you must use. Ease of updating an uncomplicated SEO tools. Users can log into your Wordpress site from any computer and even on their smart phones to post new blogs or make website updates. 

There are many qualities and potentialities that a Wordpress designer must possess in them. One must look that if they have the following qualities in them or not before hiring such a designer. The following qualities are listed below-
  • They must have the knowledge of HTML5 and CSS3.They must know how to optimize images and graphics using CSS sprites.
  • Must have the knowledge about Search engine optimization.
  • Must know at what process the company will provide the designers in full time, part time or in hourly basis?
  • At what cost the company will offer them with high quality assurance.
  • Must know to offer Wordpress blog design and customization solutions in a short period of time.
  • Must know the working methodologies and project management techniques followed by Wordpress designers for implementing Wordpress projects.
  • Check out the Wordpress design portfolio of the Wordpress designer. It will help you to get detailed information about his or her experience, knowledge and expertise in WordPress designing.
For More Details, Please visit www.WordPressIndia.in

Making calls from iPhone App

Making calls from iPhone App

This application allows to make call within app , after call completion User can get back to the running application.


// label for "Contact Number"
UILabel *headerLbl = [[UILabel alloc]initWithFrame:CGRectMake(20,105,100,40)];
headerLbl.text = @"Contact # :";
headerLbl.textAlignment = UITextAlignmentCenter;
headerLbl.backgroundColor = [UIColor clearColor];
[self.view addSubview:headerLbl];
[headerLbl release];

compPhoneHead = [[UIButton alloc]initWithFrame:CGRectMake(133,105,146,39)];
UIColor *background_Color = [UIColor colorWithPatternImage:[UIImage imageNamed:@"phoneNoButton.png"]];
compPhoneHead.backgroundColor = background_Color;
[compPhoneHead addTarget:self action:@selector(callAlert) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:compPhoneHead];

compPhone = [[UILabel alloc]initWithFrame:CGRectMake(120,115,193,20)];
compPhone.backgroundColor = [UIColor clearColor];
compPhone.font = [UIFont fontWithName:@"Times New Roman" size:15];
compPhone.text = @"(012)345-6789";
compPhone.textColor = [UIColor blackColor];
compPhone.textAlignment = UITextAlignmentCenter;
[self.view addSubview:compPhone];


Phone Number on screen


Following code is used to implement the Calling functionality.

-(void)callAlert{

alert = [[UIAlertView alloc] initWithTitle:@"Message" message:@"Are you sure to make Call" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel", nil];
[alert show];
[alert release];
}
// alert view delegate
- (void) alertView:(UIAlertView *)alertV clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0 && alertV==alert){
[self makeCall];
}
}
// method to make call if “OK” button is clicked on AlertView
-(void)makeCall{

NSLog(@"this is calling phone");
NSString *phoneNumber = [NSString stringWithFormat:@"tel:%@",compPhone.text];
phoneNumber = [phoneNumber stringByReplacingOccurrencesOfString:@"(" withString:@""];
phoneNumber = [phoneNumber stringByReplacingOccurrencesOfString:@") " withString:@"-"];
phoneNumber = [phoneNumber stringByReplacingOccurrencesOfString:@" " withString:@""];
NSURL *phoneUrl = [[NSURL alloc] initWithString:phoneNumber];

Opening an app within another app is managed in iOS through the "url scheme" mechanism. If an app defines an url scheme and this scheme is public, then we can use it to run the app. Basic rule is to first check that the device supports that scheme like we cannot make a phone call on an iPad because the phone app is not supported on iPad). If the scheme is supported then we can call it. This concept is used in making call through app.


// Check If device is able to make a call or not

if([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
NSURLRequest *phoneRequest = [NSURLRequest requestWithURL:phoneUrl];
UIWebView *phoneWebView = [[UIWebView alloc]init];
[phoneWebView loadRequest:phoneRequest];
} else {

// do something else, e.g. inform the user that he/she cannot open the app
UIAlertView *alerts = [[UIAlertView alloc] initWithTitle:@"Message" message:@"Unable to make Call" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles: nil];
[alerts show];
[alerts release];
}
}

Export Fusion Charts as Images

Export Fusion Charts as Images

For enabling export of chart at client-side, we'll need to assemble the following elements: Note:Here, we assume that you have been able to generate the chart for your page.

⇒ The chart itself embedded using Fusion Charts JavaScript class inside FusionCharts.js.
⇒ Fusion Charts Export Component - This is named FCExporter.swf.
⇒ Fusion Charts Export Component JavaScript class - This JavaScript class is inside js file named FusionChartsExportComponent.js.


1. Including java script class in your page:
<script type="text/javascript" src="js/FusionCharts.js"></script>
<script type="text/javascript" src="js/FusionChartsExportComponent.js"></script>

2. create an instance of the export component in your page using the following JavaScript code:

//Initialize Batch Exporter with DOM Id as fcBatchExporter
var myExportComponent = new FusionChartsExportObject('fcBatchExporter', "swf/FCExporter.swf");
//Add the charts to queue. The charts are referred to by their DOM Id.
myExportComponent.sourceCharts = ['myChartId1'];
//Chenge the message
myExportComponent.componentAttributes.defaultExportFileName = 'Column2D Chart';
//Render the exporter SWF in our DIV fcexpDiv
myExportComponent.Render("fcexpDiv");
myExportComponent.BeginExport();
//Display coverscreen and exporter div
function displayscreen(){
document.getElementById('cover_screen').style.display='block';
document.getElementById('fcexpDiv1').style.display='block';
}


3. Draw the chart and export it:

// apply Cover screen
<div class="cover_screen" style="display:none;" id="cover_screen"></div>
<div id="fcexpDiv1" class="ExportContainer" align="center">
// Div where the export chart is rendered
<div id="fcexpDiv"> Area for FusionCharts Export </div> </div>

//Div where the chart is shown
<div id="chart1div" style="z-index:-15000;" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>
// Java Script for chart
<script type="text/javascript">
var myChart1 = new FusionCharts("swf/Column2D.swf", "myChartId1", "350", "300", "0", "1");
var data= "<chart yAxisName='Sales Figure' caption='Top 5 Sales Person' numberPrefix='$'
useRoundEdges='1' bgColor='FFFFFF,FFFFFF' showBorder='0'exportDialogColor='e1f5ff'
exportDialogBorderColor='0372ab' exportDialogFontColor='0372ab'
exportDialogPBColor='0372ab' exportEnabled='1' exportAtClient='1'"
data += "exportHandler='fcBatchExporter'>”
data + = "<set label='Alex' value='25000'/>"
data + = "<set label='Mark' value='35000'/>"
data+= "<set label='David' value='42300'/>"
data+= "<set label='Graham' value='35300'/>"
data+= "<set label='John' value='31300'/>"
data+= "</chart>"
myChart1.addParam("wmode", "opaque");
myChart1.setDataXML(data);
myChart1.render("chart1div");
</script>
<input type="image" src="image/export.gif" id='one' Click="initiateExport();"/>

Chart with export button

capturing the image

Save image

Get contact from the android device

Get contact from the android device

The Contacts Database is divided into 3 tables which are contacts, raw contacts and data.
⇒ Each table contains column (_ID) which is an auto incremented primary key.
⇒ Data table contains all the contact info like phone number, mail id, address etc.
⇒ User cannot add any data into contacts table. The data in this table is populated internally.
⇒ The RawContacts table contains all the actual contact created .Hence we use the raw contacts while retrieve contacts.



Uri uri=RawContacts.CONTENT_URI;
String projection [] = new String[]{ RawContacts.CONTACT_ID,RawContacts.ACCOUNT_TYPE,RawContacts.DISPLAY_NAME_PRIMARY };
Here RawContacts.CONTACT_ID is the id of the row in ContactsContract.Contacts table that this raw Contact belongs to.

Raw contacts are linked to contacts by the aggregation process which can be controlled by AGGREGATION_MODE field.


String selection=RawContacts.ACCOUNT_TYPE+ “=?”;
String selectionArgs[]=new String[]{“any account name which type contact you want to retrieve like for
retrieve Google contacts you have to specify “com.google”};
String sortOrder=ContactsContract.Display_Name;

Now create cursor using these parameters.

Cursor cursor=getContentResolver.query(uri, projection, selection, selectionArgs, sortOrder);
Now all the requested column and their value in cursor now and we can get those value from the cursor like this.
While (cursor.moveToNext()) {
int contactId=cursor.getInt(cursor.getColumnIndex(RawContacts.CONTACT_ID));
String contactName = cursor.getString(cursor.getColumnIndex(RawContacts.DISPLAY_NAME_PRIMARY);
String accountType = cursor.getString(cursor.getColumnIndex(RawContacts.ACCOUNT_TYPE);
}

So now we get only Google contacts but if we put selectionArgs=null then we get all the existing contact of device.


How to get Sim contact details from android device?

⇒ In this we have to take different Uri to get sim contact detail.
⇒ The name of the column where sim contact name and contact number are exists names are “name” and “number”.

Uri uri=Uri.parse (“content://icc/and”);
String projection [] = null;
String selection = null;
String selectionArgs [] = null;
String sortOrder = null;
Cursor simCursor= getContentResolver.query (uri, projection, selection, selectionArgs, sortOrder);
While (simCursor.moveToNext()) {
String simContactName=simCursor.getString(simCursor.getColumnIndex(“name”));
String simContactNumber=simCursor.getString(simCursor.getColumnIndex(“number”));
simContactNumber.replaceAll (“\\D”,””);
simContactNumber.replaceAll (“&”,””);
}
So now we get sim contact number and contact name.

Get Contacts

Get Next or Previous 12 Months in Oracle

Get Next or Previous 12 Months in Oracle using procedure

In oracle to get next or previous 12 months from specified month of year, below is a procedure which accept two parameter year and month name.


CREATE OR REPLACE PROCEDURE dbo.GET_MONTHS(
PERIOD_YEAR IN VARCHAR2,
PERIOD_MONTH IN VARCHAR2
)
AS
MONTH_STR1 VARCHAR2(2000);
MONTH_STR2 VARCHAR2(2000);
V_MONTH_DIGIT NUMBER;
V_PERIOD_YEAR NUMBER;
P_PERIOD_YEAR NUMBER;

BEGIN

SELECT TO_NUMBER(TO_CHAR(TO_DATE(PERIOD_MONTH,'MON'),'MM'),'99')
INTO V_MONTH_DIGIT FROM DUAL;
V_PERIOD_YEAR := TO_CHAR(TO_NUMBER(PERIOD_YEAR,'9999')+1,'9999');
P_PERIOD_YEAR := TO_CHAR(TO_NUMBER(PERIOD_YEAR,'9999')-1,'9999');
FOR LP IN 0..11
LOOP
IF LP<V_MONTH_DIGIT-1 THEN
MONTH_STR2 := MONTH_STR2 || TO_CHAR(ADD_MONTHS('1-JAN-'||PERIOD_YEAR,LP),'MON')||'-'||PERIOD_YEAR||',';
MONTH_STR1 := MONTH_STR1 || TO_CHAR(ADD_MONTHS('1-JAN-'||PERIOD_YEAR,LP),'MON')||'-'||V_PERIOD_YEAR||',';
ELSE
MONTH_STR2 := MONTH_STR2 || TO_CHAR(ADD_MONTHS('1-JAN-'||PERIOD_YEAR,LP),'MON')||'-'||P_PERIOD_YEAR||',';
MONTH_STR1 := MONTH_STR1 || TO_CHAR(ADD_MONTHS('1-JAN-'||PERIOD_YEAR,LP),'MON')||'-'||PERIOD_YEAR||',';
END IF;
END LOOP;

MONTH_STR1 := substr(MONTH_STR1,0,length(MONTH_STR1)-1);
MONTH_STR2 := substr(MONTH_STR2,0,length(MONTH_STR2)-1);

DBMS_OUTPUT.PUT_LINE('Next 12 Months :'||MONTH_STR1);
DBMS_OUTPUT.PUT_LINE('Previous 12 Months :'||MONTH_STR2);
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
RAISE;

END GET_MONTHS;


Parameters :

PERIOD_YEAR: Year from which we get next or previous year
PERIOD_MONTH: Month from which we get next or previous month
In the procedure firstly we get the passed month in numeric format in local variable V_MONTH_DIGIT. After that we execute a loop for generate months and store in local variables MONTH_STR1 and MONTH_STR2.

To execute procedure: EXEC GET_MONTHS('2007','APR');

Output:

Capturing or Browsing photo Programmatically in iPhone

Capturing or Browsing photo Programmatically in iPhone

Using UIImagePicker Photo Browsing in Application is possible.


UIImageView *empImage = [[UIImageView alloc] init];
UIImage *im = [UIImage imageNamed:@"ImagePlaceholder.png"];
[empImage setImage:im];
empImage.frame = CGRectMake(60, 40, 200, 200);
[self.view addSubview:empImage];

//Choose Image button
UIButton *showImage = [[UIButton alloc]init];
UIImage *Image = [UIImage imageNamed:@"browseButton.png"];
[showImage setBackgroundImage:Image forState:UIControlStateNormal];
[showImage addTarget:self action:@selector(getPhoto:)
showImage.frame = CGRectMake(62,250,96,33); forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:showImage];

//Caputure Image button
UIButton *captureImage = [[UIButton alloc]init];
UIImage *Image1 = [UIImage imageNamed:@"captureButton.png"];
[captureImage setBackgroundImage:Image1 forState:UIControlStateNormal];
[captureImage addTarget:self action:@selector(capturePicture:) forControlEvents:UIControlEventTouchUpInside];
captureImage.frame = CGRectMake(162,250,96,33);
[self.view addSubview:captureImage];

PlaceHolder for Image and browse


Browse button opens the phone gallery where Images are saved.

// method for “showImage” button
-(IBAction) getPhoto:(id) sender {
UIImagePickerController * picker = [[[UIImagePickerController alloc] init]autorelease];
picker.delegate = self;

if((UIButton *) sender == choosePhotoBtn) {
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
} else {
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}

[self presentModalViewController:picker animated:YES];
}

Browse Image


// method for “captureImage” button
-(IBAction)capturePicture:(id)sender{

if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Message" message:@"Unable to Capture image" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles: nil];
[alert show];
[alert release];
}else{
// if capture image is not supported by the device or Stimaulator
UIImagePickerController* imagePickerController = [[[UIImagePickerController alloc]init]autorelease];
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController.delegate = self;
imagePickerController.allowsEditing = YES;
[self presentModalViewController:imagePickerController animated:YES];
}
}

Capture Button opens iPhone Camera and Stores in Application Directory

// delegate imagePickerController
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}

The UIImagePickerController class manages customizable, system-supplied user interfaces for taking pictures and movies on supported devices, and for choosing saved images and movies for use in your app. An image picker controller manages user interactions and delivers the results of those interactions to a delegate object.

Delegates to be included in .h file : <UIImagePickerControllerDelegate,UIPopoverControllerDelegate> Frameworks required in the Application : UIKit.framework, Foundation.framework, CoreGraphics.framework

Loaded Image

Validations in Struts2

Validations in Struts2

In struts2 we can define validation using xml file. In struts2 for validation rules has classes and all classes implements validator interface.

Struts Action 2 relies on a validation framework provided by XWork to enable the application of input validation rules to your Actions before they are executed. Struts2 Validation Framework allows us to separate the validation logic from actual Java/JSP code, where it can be reviewed and easily modified later.

Validation framework comes with set of useful routines to handle form validation automatically and it can handle both server side as well as client side form validation. If certain validation is not present, you can create your own validation logic by implementing java interface.

  • required
  • requiredstring
  • stringlength
  • int
  • double
  • date
  • email
  • url
  • fieldexpression
  • regex For each rule given, there is an implementation class exist for it as told above.


    Examples:
    required
    For ‘required’ rule the class name is RequiredFieldValidator, for ‘int’ the class name is IntRangeFieldValidator
    If we want to create our own validator class then our class should also implements validator interface. Validator
    interface is given in com.opensymphony.xwork2.validators.*. This rule verify whether user entered value is null
    or not, here we cannot pass any parameters.
    Example:
    <field name="uname">
    <field-validator type="required">
    <message> User name is mandatory </message>
    </field-validator>
    </field>


    requiredstring
    This will validates whether the input entered is a valid string or not we can pass a parameter called trimto this
    rule. Trim will removes extra space from left and right sides of given word.
    Example:
    <field name="uname">
    <field-validator type="requiredstring">
    <param name="true">true</param>
    <message> you must enter string value </message>
    </field-validator>
    </field>

    stringlength
    This rule validates whether the given input is with in the given range of characters or not. This rule is the combination
    of both min, max length rules. To this rule we can pass either both parameters min length and max length or any one of
    the paramenters.
    Example:
    <field name="uname">
    <field-validator type="requiredstring">
    <param name="minLength">8</param>
    <param name="maxLength">12</param>
    <message> user name should be with in ${minLength} and ${maxLength} characters </message>
    </field-validator>
    </field>

    int
    This rule verifies whether the given input value is with in the given range of integer or not, To this rule we need to pass
    min, max parameters.
    Example:
    <field name="uname">
    <field-validator type="int">
    <param name="min">25</param>
    <param name="max">35</param>
    <message>Age should be in between ${min} and ${max} </message>
    </field-validator>
    </field>
    Note: Actually ‘double‘ also same as int, but we need to pass the parameters minInclusive,maxInclusive

    double
    Double field validator check whether given input is double or not .
    fieldName - The field name this validator is validating. Required if using in-Validator Syntax otherwise not required
    minInclusive - the minimum inclusive value in FloatValue format specified by Java language (if none is specified, it will be checked)
    maxInclusive - the maximum inclusive value in FloatValue format specified by Java language (if none is specified, it will be checked)
    minExclusive - the minimum exclusive value in FloatValue format specified by Java language (if none is specified, it will be checked)
    maxExclusive - the maximum exclusive value in FloatValue format specified by Java language (if none is specified, it will be checked)
    Example:
    <validators>
    <!-- Plain Validator Syntax -->
    <validator type="double">
    <param name="fieldName">percentage</param>
    <param name="minInclusive">20.1</param>
    <param name="maxInclusive">50.1</param>
    <message>Age needs to be between ${minInclusive} and MaxInclusive} (inclusive)</message>
    </validator>

    <!-- Field Validator Syntax -->
    <field name="percentage">
    <field-validator type="double">
    <param name="minExclusive">0.123</param>
    <param name="maxExclusive">99.98</param>
    <message>Percentage needs to be between ${minExclusive}
    ${maxExclusive} (exclusive)</message>
    </field-validator>
    </field>
    </validators>


    date
    This will validate whether the given input date is with in the range of the dates or not, we need to pass min,
    max parameters to this rule. When we enter the date values then the format to be followed is dd-mm-yyyy
    Example:
    <field name="dob">
    <field-validator type="date">
    <param name="min">01/01/2011</param>
    <param name="max">01/01/2020</param>
    <message>year should be in between ${min} and ${max} </message>
    </field-validator>
    </field>
    And email, url are simple just like required, we no need to pass any parameters hope you are good.

    fieldexpression
    In struts 1.x, with validator frame work we can do only per field validations, i mean we can validate field by field.
    But here in struts 2.x we can do the between field validations also with this fieldexpression rule. Actually if we want
    to do between fields in struts 1.x, we must do manually but here we can do this via framework validator framework which
    supports both per-field and between filed validations also. To work with this rule we must pass one parameter named
    ‘expression‘ between field means, we can compare the current entered value with any one of above field.
    Example:
    <field name="myDateOfBirth">
    <field-validator type="fieldexpression">
    <param name="expression">
    <! [ CDATA[#myDateOfBirth < #myFatherBirth]] >
    </param>
    <message>Your Birth date must be less then your father dob</message>
    </field-validator>
    </field>
    Note: here #myFatherBirth is other field name
    email
    This rule validates whether the given input in the correct format or not.
    Example:
    <field name="email">
    <field-validator type="requiredstring">
    <message key="errors.required" />
    </field-validator>
    <field-validator type="email">
    <message key="errors.invalid" />
    </field-validator>
    </field>

    url
    This rule validates whether the given input in the correct format or not.
    Example:
    <field name="fblink">
    <field-validator type="url">
    <message>Please enter a valid url</message>
    </field-validator>
    </field>
    regex
    Validates a string field using a regular expression.
    Example:
    <field name="userId">
    <field-validator type="requiredstring">
    <message>Employee Id is a mandatory field</message>
    </field-validator>
    <field-validator type="regex">
    <param name="expression">
    <![CDATA[([E][m][p][0-9][0-9][0-9])]]>
    </param>
    <message>Valid Employee Id required e.g. Emp001</message>
    </field-validator>
    </field>

  • Performance Tuning in DataBase

    Performance Tuning in Oracle

    One point that needs to be made clear is that performance tuning is not an exact science - you can't always predict that a certain tactic or technique will improve performance. Every change has to be tested, because it may improve performance in one area, it may also degrade performance in another area. Adding an index is a classic example of this - it may improve query performance but the performance of inserts and deletes become slower because the index entries also have to be updated.

    You also need to be aware that improving response time is not the only aim that you might have - you might want to reduce memory usage instead - which might mean having to redesign or rewrite some stored procedures. All these issues need to be considered before you start looking at performance.

    Validation framework comes with set of useful routines to handle form validation automatically and it can handle both server side as well as client side form validation. If certain validation is not present, you can create your own validation logic by implementing java interface.

    Causes of Poor Performance

    One cause of poor performance is high Oracle communication overhead. Oracle must process SQL statements one at a time. Another cause of poor performance is inefficient SQL statements. Because SQL is so flexible, you can get the same result using two different statements. Using one statement might be less efficient.


    For example, the following two SELECT statements return the same rows (the name and number of every department having at least one employee):

    EXEC SQL SELECT DNAME, DEPTNO
    FROM DEPT
    WHERE DEPTNO IN (SELECT DEPTNO FROM EMP)
    END-EXEC.

    Contrasted with:

    EXEC SQL SELECT DNAME, DEPTNO
    FROM DEPT
    WHERE EXISTS
    (SELECT DEPTNO FROM EMP WHERE DEPT.DEPTNO = EMP.DEPTNO)
    END-EXEC.

    The first statement is slower because it does a time-consuming full scan of the EMP table for every department number in the DEPT table. Even if the DEPTNO column in EMP is indexed, the index is not used because the subquery lacks a WHERE clause naming DEPTNO.

    Another cause of poor performance is unnecessary parsing and binding. Recall that before executing a SQL statement, Oracle must parse and bind it. Parsing means examining the SQL statement to make sure it follows syntax rules and refers to valid database objects. Binding means associating host variables in the SQL statement with their addresses so that Oracle can read or write their values.

    Automatic Performance Tuning Features

    The Oracle automatic performance tuning features include:

  • Automatic Workload Repository (AWR) collects, processes, and maintains performance statistics for problem detection and self-tuning purposes.
  • Automatic Database Diagnostic Monitor (ADDM) analyzes the information collected by the AWR for possible performance problems with the Oracle database.
  • SQL Tuning Advisor allows a quick and efficient technique for optimizing SQL statements without modifying any statements.
  • SQLAccess Advisor provides advice on materialized views, indexes, and materialized view logs.
  • End to End Application tracing identifies excessive workloads on the system by specific user, service, or application component.
  • Server-generated alerts automatically provide notifications when impending problems are detected.
  • Additional advisors that can be launched from Oracle Enterprise Manager, such as memory advisors to optimize memory for an instance. The memory advisors are commonly used when automatic memory management is not set up for the database. Other advisors are used to optimize mean time to recovery (MTTR), shrinking of segments, and undo tablespace settings. Tuning an Application / Reducing Load

    If your whole application is performing suboptimally, or if you are attempting to reduce the overall CPU or I/O load on the database server, then identifying resource-intensive SQL involves the following steps:

  • Determine which period in the day you would like to examine; typically this is the application's peak processing time.
  • Gather operating system and Oracle statistics at the beginning and end of that period. The minimum of Oracle statistics gathered should be file I/O (V$FILESTAT), system statistics (V$SYSSTAT), and SQL statistics (V$SQLAREA, V$SQL or V$SQLSTATS, V$SQLTEXT, V$SQL_PLAN, and V$SQL_PLAN_ STATISTICS).
  • Using the data collected in step two, identify the SQL statements using the most resources. A good way to identify candidate SQL statements is to query V$SQLSTATS. V$SQLSTATS contains resource usage information for all SQL statements in the shared pool. The data in V$SQLSTATS should be ordered by resource usage. The most common resources are:
  • Buffer gets (V$SQLSTATS.BUFFER_GETS, for high CPU using statements)
  • Disk reads (V$SQLSTATS.DISK_READS, for high I/O statements)
  • Sorts (V$SQLSTATS.SORTS, for many sorts)

    One method to identify which SQL statements are creating the highest load is to compare the resources used by a SQL statement to the total amount of that resource used in the period. For BUFFER_GETS, divide each SQL statement's BUFFER_GETS by the total number of buffer gets during the period. The total number of buffer gets in the system is available in the V$SYSSTAT table, for the statistic session logical reads. Similarly, it is possible to apportion the percentage of disk reads a statement performs out of the total disk reads performed by the system by dividing V$SQL_STATS.DISK_ READS by the value for the V$SYSSTAT statistic physical reads. The SQL sections of the Automatic Workload Repository report include this data, so you do not need to perform the percentage calculations manually.

    After you have identified the candidate SQL statements, the next stage is to gather information that is necessary to examine the statements and tune them.

    If you are most concerned with CPU, then examine the top SQL statements that performed the most BUFFER_GETS during that interval. Otherwise, start with the SQL statement that performed the most DISK_READS.

    Information to Gather During Tuning

    The tuning process begins by determining the structure of the underlying tables and indexes. The information gathered includes the following:

  • Complete SQL text from V$SQLTEXT
  • Structure of the tables referenced in the SQL statement, usually by describing the table in SQL*Plus
  • Definitions of any indexes (columns, column orderings), and whether the indexes are unique or non-unique
  • Optimizer statistics for the segments (including the number of rows each table, selectivity of the index columns), including the date when the segments were last analyzed
  • Definitions of any views referred to in the SQL statement
  • Repeat steps two, three, and four for any tables referenced in the view definitions found in step five
  • Optimizer plan for the SQL statement (either from EXPLAIN PLAN, V$SQL_PLAN, or the TKPROF output)
  • Any previous optimizer plans for that SQL statement

    Note: It is important to generate and review execution plans for all of the key SQL statements in your application. Doing so lets you compare the optimizer execution plans of a SQL statement when the statement performed well to the plan when that the statement is not performing well. Having the comparison, along with information such as changes in data volumes, can assist in identifying the cause of performance degradation.

  • Know the Benefits of Hiring a Magento Developer

    Today in this vast competitive market websites plays a significant role for doing e-commerce businesses to buy and to sell the products online all across the globe. A website must have the capability to grab the audience’s attention. The main success behind a successful website is its visibility, easy to download, user friendly and a complete CMS (Content management system).

    Magento development India has many important features to help and make websites noticeable in an online market. It keeps updated and upgrade and gives a wide e-commerce platform to control the online transaction. This service is very low in cost and the benefits after this is very high in return and it helps to enhance an e-commerce business. With the help of Magento customer relationship services can be performed very easily. It has its many unique features like account creation, customized form and currency conversion. Among the many e-commerce websites Magento have played a significant role and have acquired the top position because of its elasticity, portability and durability.

    If one hire a Magento developer one can get the full benefit out of it. Magento developers have got plenty of experiences to help you throughout the way. They will never put you down infact they will help you to solve out the problems and develop your websites and make it more attractive to attract the target audience. The benefits of hiring a Magento developer are-

    • They maintain the quality throughout the project to ensure faster delivery.
    • Their main focus is on clients requirements to give them the satisfaction.
    • Investment is not required from your end.
    • Dedicated and experienced developers working for you.
    • They work for 24 * 7.
    • Trust worthiness and reliability.
    • They deliver the best work on time under supervision.
    • Technical support and direct communication.
    For More Details Visit  - www.MagentoIndia.com