GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 228 of 237    Print  
Is the order in which the conditions are given in the 'WHERE' clause are important?
Mean I heard from Oracle 8i onwards the order of where clause condition does not matter which oracle creates the explain plan...and execute..Is it true?


  
Total Answers and Comments: 2 Last Update: November 07, 2008     Asked by: babhatti 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: manoj_behera82
 
Yes the order is important. But it is important for the performance of the query and not for the final result.
The output of the query will be the same irrespective of the order in which the join conditions are applied. Ideally the condition that filters maximum number of records should be placed last. Reason,  Oracle follows a bottom up approach.

Above answer was rated as good by the following members:
ds_devi
August 07, 2008 01:43:34   #1  
gtomar Member Since: July 2008   Contribution: 9    

RE: Is the order in which the conditions are given in the 'WHERE' clause are important?
Hi,

Where Clause conditions execution are independent of order in explain plan but it reads top to bottom.

Thanks,
Gunjan

 
Is this answer useful? Yes | No
August 07, 2008 08:31:07   #2  
manoj_behera82 Member Since: August 2008   Contribution: 1    

RE: Is the order in which the conditions are given in the 'WHERE' clause are important?
Yes the order is important. But it is important for the performance of the query and not for the final result.
The output of the query will be the same irrespective of the order in which the join conditions are applied. Ideally the condition that filters maximum number of records should be placed last. Reason,  Oracle follows a bottom up approach.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

 WHERE  CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers 
Latest Answer : When referencing the current row from an explicit cursor, use the WHERE CURRENT OF clause. This allows you to apply updates and deletes to the row currently being addressed, without the need to explicitly reference the ROWID. You must include the FOR ...

                Insert         Update          
Latest Answer : A trigger may be a 1. DML Trigger on tables2. Instead of triggers on views3. System triggers on database or schemaBased on the way it executes statements  triggers are of two types1. Statement leve trigger2.  Row level triggerA trigger fires ...

          I.  done using Database triggers.          ii. done using Integarity Constraints. I & ii. Exception 
Latest Answer : create table a ( b number, c number check (c >100) );create or replace trigger t1 before insert on a begindbms_output.put_line('this is before insert trigger'); end;create or replace trigger t2after insert on a begindbms_output.put_line('this ...

Latest Answer : Table is the basic entity in any RDBMS , so for storing data you need table .for view - if you have complex query from which you want to extract data again and again , moreover it is a standard data which is required by many other user also for REPORTS ...

What is pragma? can any one give me the example of autonomous Transaction ?can we change the order of procedure parameter while calling procedure?
Read Answers (6) | Asked by : manali

If there is an index including three columns A, B and C. And if we issue a query in which where clause uses only column B....will the index be useful??and what if the where clause only has coulmn A..will the index b useful??
Read Answers (6) | Asked by : smita

Latest Answer : The correct order is as below. Trigger firing sequence: 1) Before statement level triggers, if present 2) For each row a) Before row level triggers, if present b) After row level triggers, if present 3) Actual Statement 4) After statement level ...
Read Answers (5) | Asked by : joseph

In PL/SQL if we write select statement with INTO clause it may return two exceptions NO_DATA_FOUND or TOO_MANY_ROW . To do you avoid these execeptions. How do you write SQL statement in alternative way?
Read Answers (7) | Asked by : ddkdhar

Write sample code that can create a hierachical set of data without using a start with and connect by clause in PL/SQL

SELECT APE.DAT_INSERT_DATE as "Payment Entry Date", Case when APE.TXT_INTERMEDIARY_CD is null or APE.TXT_PAYER_CUSTOMER_ID APE.TXT_INTERMEDIARY_CD then (Select TXT_CUSTOMER_NAME from GENMST_CUSTOMER 
Latest Answer : create or replace procedure sql_to_procedure as declare cursor c1 is SELECT APE.DAT_INSERT_DATE as "Payment Entry Date",APE.TXT_INTERMEDIARY_CD AS "Intermediary ID",APE.TXT_PAYER_CUSTOMER_ID as "CustomerID/Payer ID",TXT_CUSTOMER_NAME ...
Read Answers (1) | Asked by : preeti


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Listening Skills : Why listening is important

Why do you need to have good listening skills You might recall that several years ago on TV there was a public service announcement that talked about the importance of listening skills The PSA differentiated between hearing which is merely a physical ability and listening which is actually a skill B
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape