Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: FIRST_ROWS hints

Re: FIRST_ROWS hints

From: <Rajesh.Rao_at_jpmchase.com>
Date: Wed, 08 Oct 2003 11:29:29 -0800
Message-ID: <F001.005D26B4.20031008112929@fatcity.com>

Very Much expected behaviour. Your increase in the db_block_size from 8 to 16, is making the optimizer choose full table scans, where applicable, since you have to scan through only half the number of blocks now.

A nested loop will starting throwing the initial results faster. A sort merge join might take more time to start throwing out the results, but the entire job will finish faster. So, the first rows hint is forcing the optimizer to choose nested loops.

Regards
Raj

                                                                                                                     
                    Sai Selvaganesan                                                                                 
                    <ssaisundar_at_sbcg       To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>       
                    lobal.net>             cc:                                                                       
                    Sent by:               Subject:     FIRST_ROWS hints                                             
                    ml-errors_at_fatcit                                                                                 
                    y.com                                                                                            
                                                                                                                     
                                                                                                                     
                    10/08/2003 02:54                                                                                 
                    PM                                                                                               
                    Please respond                                                                                   
                    to ORACLE-L                                                                                      
                                                                                                                     
                                                                                                                     




hi

i had a migration from 9.2.0.3 to 9.2.0.4 of a database and here are a couple of observations. please help me in understanding this.

i changed the db block size from 8k to 16k and all sql queires which were using nested loops earlier moved to sort merge joins. i ran 10053 and form whatever i could understand the 9204 db has fewer number of blocks compared to the existing 9203 (db size changed to 16k) and sort merge join turned out to be less costlier than nested loops (i couldnt understand the sort statistics). no parameter other than db block size was changed.

after breaking my head i changed the optimizer mode from choose to first rows and the query is back to the old explain plans.

please clarify
1. whether this is a expected behaviour
2. what is first_rows hint and whether it is good move to go to first_rows to fix this problem.

thanks
sai

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: Rajesh.Rao_at_jpmchase.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Oct 08 2003 - 14:29:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US