[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

Is it possible to optimise this request without creating an index?

Asked by AYEB in Oracle Database

Tags: plus, fast, formatter

Is it possible to optimise this request without creating any more indexes.

table  tsd_uc_aff                        : 11000 rows

primary key :
PK_TSD_UC_AFF ON (CODE_UC_AFF, VERSION_UC_AFF)~

~~~~~~~~~~~~~~~~
table  tsd_fait_paye_detail         : 939474639 rows
no indexes on  columns:
code_cep  ,
code_qualif,        
code_classe_perso

Primary key :
PK_TSD_FAIT_PAYE_DETAIL ON  (MOIS_COMPTABLE, EXERCICE_COMPTABLE, NUMERO_CP, CODE_COMPTE, CPLT_COMPTE, CODE_UC_EMET, VERSION_UC_EMET, CODE_UC_AFF_PAYE, CPLT_UC_AFF_PAYE, VERSION_UC_AFF_PAYE, CODE_JOURNAL)

/* Formatted on 2007/06/21 09:27 (Formatter Plus v4.8.8) */
SELECT DISTINCT    tfpd.exercice_comptable
                || ';'
                || tfpd.mois_comptable
                || ';'
                || DECODE (SUBSTR (tua.code_domaine, 1, 2),
                           'EC', 'FT',
                           tua.code_domaine
                          )
                || ';'
                || tua.code_etab
                || ';'
                || TO_CHAR (SUM (tfpd.solde_euro), '0999999999999.99')
           FROM (SELECT   code_uc_aff, MAX (version_uc_aff) AS nomaxuc
                     FROM tsd_uc_aff
                 GROUP BY code_uc_aff) maxi,
                tsd_fait_paye_detail tfpd,
                tsd_uc_aff tua
          WHERE tfpd.code_uc_aff_paye = tua.code_uc_aff
            AND tfpd.code_uc_aff_paye = maxi.code_uc_aff
            AND tfpd.version_uc_aff_paye = maxi.nomaxuc
            AND tfpd.version_uc_aff_paye = tua.version_uc_aff
            AND tfpd.code_cep = '64'
            AND tfpd.code_qualif IN ('C', 'D_XS')
            AND tfpd.code_classe_perso = '1'
            AND (   tfpd.exercice_comptable = 2005
                 OR tfpd.exercice_comptable = 2006
                 OR tfpd.exercice_comptable = 2007
                )
       GROUP BY tfpd.exercice_comptable,
                tfpd.mois_comptable,
                DECODE (SUBSTR (tua.code_domaine, 1, 2),
                        'EC', 'FT',
                        tua.code_domaine
                       ),
                tua.code_etab


Explain plan :
Plan
SELECT STATEMENT  CHOOSECost: 468 K  Bytes: 3 M  Cardinality: 89 K                                                        
      11 SORT UNIQUE  Cost: 468 K  Bytes: 3 M  Cardinality: 89 K                                                  
            10 SORT GROUP BY  Cost: 468 K  Bytes: 3 M  Cardinality: 89 K                                            
                  9 VIEW SYS. Cost: 466 K  Bytes: 7 M  Cardinality: 246 K                                      
                        8 FILTER                                
                              7 SORT GROUP BY  Cost: 466 K  Bytes: 15 M  Cardinality: 246 K                          
                                    6 HASH JOIN  Cost: 450 K  Bytes: 170 M  Cardinality: 3 M                    
                                          1 INDEX FAST FULL SCAN UNIQUE PROP_SICD.PK_TSD_UC_AFF Cost: 6  Bytes: 65 K  Cardinality: 11 K              
                                          5 HASH JOIN  Cost: 450 K  Bytes: 41 M  Cardinality: 712 K              
                                                2 TABLE ACCESS FULL PROP_SICD.TSD_UC_AFF Object Instance: 4  Cost: 93  Bytes: 248 K  Cardinality: 11 K        
                                                4 PARTITION RANGE INLIST  Partition #: 10  Partitions accessed #KEY(INLIST)      
                                                      3 TABLE ACCESS FULL PROP_SICD.TSD_FAIT_PAYE_DETAIL Object Instance: 3  Cost: 449 K  Bytes: 25 M  Cardinality: 712 K  Partition #: 10  Partitions accessed #KEY(INLIST)
[+][-]06/21/07 11:32 AM, ID: 19335687Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Oracle Database
Tags: plus, fast, formatter
Sign Up Now!
Solution Provided By: jrb1
Participating Experts: 1
Solution Grade: A
 
[+][-]07/25/07 11:47 AM, ID: 19568533Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/31/07 02:26 PM, ID: 19604368Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89