Query Perfomance

Hi friends ,
                  I have a report runnning in production , the performance of the query dramatically decreases when I apply a filter to one of my characteristics, is there any way I can get handle the performance ?
thanks ,

Hi,
I can recommend you to use InfoCubes instead of DSO for queries. The performance of DSO reports is very bad. With an InfoCube you can use aggregates described in the other threads. In general for you reports you can use precalculation by Reporting Agent or Broadcaster.
Take a look what you can do:
FAQ - The Future of SAP NetWeaver Business Intelligence in the Light of the NetWeaver BI&Business Objects Roadmap
Additional:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/afbad390-0201-0010-daa4-9ef0168d41b6
--> site 9
and
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
Regards
Andreas

Similar Messages

  • SQL query perfomance is bad, Need suggestion on creating proper index

    Hello Team,
    I am executing below query on a 8 Million rows table, This query is taking around 2.5 minutes, Could some one suggest me a some index criteria which can improve my query response time to milli seconds.
    SELECT c4_pvcx0.sy_objectid, c4_pvcx0.sy_objectid, c4_pvcx0.sy_objectid FROM c4_pvcx c4_pvcx0 WHERE c4_pvcx0.c4_az_iosqos = 'C4ir00018}' AND c4_pvcx0.sy_objectid != 'C4vd00F}iD' AND c4_pvcx0.sy_pendoperation != 2 AND (c4_pvcx0.sy_changeorderid = 'SYxf0003Ga' AND c4_pvcx0.sy_version = 1 OR c4_pvcx0.sy_version = 0 AND NOT (c4_pvcx0.sy_objectid IN (SELECT c4_pvcx0.sy_objectid FROM c4_pvcx c4_pvcx0 WHERE c4_pvcx0.sy_changeorderid = 'SYxf0003Ga' AND c4_pvcx0.sy_version = 1))) ORDER BY c4_pvcx0.sy_objectid ASC
    Table definition is
      CREATE TABLE "C4_PVCX"
       (     "SY_OBJECTID" CHAR(10 BYTE) NOT NULL ENABLE,
         "SY_CREATEDDATE" VARCHAR2(24 BYTE) NOT NULL ENABLE,
         "SY_MODIFIEDDATE" VARCHAR2(24 BYTE) NOT NULL ENABLE,
         "SY_COMMITTEDDATE" VARCHAR2(24 BYTE) NOT NULL ENABLE,
         "SY_SEQUENCENUMBER" NUMBER(*,0),
         "SY_CHANGEORDERID" CHAR(10 BYTE) NOT NULL ENABLE,
         "SY_VERSION" NUMBER(*,0),
         "SY_PENDOPERATION" NUMBER(*,0),
         "SY_SNOOKERSEQNUM" NUMBER(*,0),
         "VPN" VARCHAR2(16 BYTE) NOT NULL ENABLE,
         "DOMAIN" VARCHAR2(16 BYTE) NOT NULL ENABLE,
         "SRAZ_BANDWIDTH" NUMBER(*,0),
         "SRZA_BANDWIDTH" NUMBER(*,0),
         "SRBACKUPROLE" VARCHAR2(12 BYTE) NOT NULL ENABLE,
         "SRA_CONSUME_BW" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "SRZ_CONSUME_BW" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "SRPRIORITY" NUMBER(*,0),
         "SRUNIPRIORITY" NUMBER(*,0),
         "SRA_PRIMTP" VARCHAR2(44 BYTE) NOT NULL ENABLE,
         "SRZ_PRIMTP" VARCHAR2(44 BYTE) NOT NULL ENABLE,
         "SRNAME" VARCHAR2(64 BYTE) NOT NULL ENABLE,
         "SRDESTSERV" VARCHAR2(32 BYTE) NOT NULL ENABLE,
         "SRCOST" NUMBER(*,0),
         "SREMSADMINSTATUS" VARCHAR2(16 BYTE) NOT NULL ENABLE,
         "SRA_CONSUME_CID" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "SRZ_CONSUME_CID" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "RATYPE" VARCHAR2(4 BYTE) NOT NULL ENABLE,
         "RAA_VCI" NUMBER(*,0),
         "RAZ_VCI" NUMBER(*,0),
         "RAA_VPI" NUMBER(*,0),
         "RAZ_VPI" NUMBER(*,0),
         "RA_FRTT" NUMBER(*,0),
         "RAQOS" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAA_FRDISC" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "RAZ_FRDISC" VARCHAR2(5 BYTE) NOT NULL ENABLE,
         "RAAZ_TDTYPE" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAAZ_SCR" NUMBER(*,0),
         "RAAZ_PCR" NUMBER(*,0),
         "RAAZ_MBS" NUMBER(*,0),
         "RAAZ_CDVT" NUMBER(*,0),
         "RAAZ_MCR" NUMBER(*,0),
         "RAAZ_CDV" NUMBER(*,0),
         "RAAZ_MAXCTD" NUMBER(*,0),
         "RAAZ_CLR" NUMBER(*,0),
         "RAZA_TDTYPE" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAZA_SCR" NUMBER(*,0),
         "RAZA_PCR" NUMBER(*,0),
         "RAZA_MBS" NUMBER(*,0),
         "RAZA_CDVT" NUMBER(*,0),
         "RAZA_MCR" NUMBER(*,0),
         "RAZA_CDV" NUMBER(*,0),
         "RAZA_MAXCTD" NUMBER(*,0),
         "RAZA_CLR" NUMBER(*,0),
         "RAAZ_ICR" NUMBER(*,0),
         "RAAZ_RIF" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAAZ_NRM" NUMBER(*,0),
         "RAAZ_RDF" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAAZ_ADTF" NUMBER(*,0),
         "RAAZ_TRM" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAAZ_TBE" NUMBER(*,0),
         "RAAZ_CDF" VARCHAR2(4 BYTE) NOT NULL ENABLE,
         "RAZA_ICR" NUMBER(*,0),
         "RAZA_RIF" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAZA_NRM" NUMBER(*,0),
         "RAZA_RDF" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAZA_ADTF" NUMBER(*,0),
         "RAZA_TRM" VARCHAR2(8 BYTE) NOT NULL ENABLE,
         "RAZA_TBE" NUMBER(*,0),
         "RAZA_CDF" VARCHAR2(4 BYTE) NOT NULL ENABLE,
         "C4PVC_ID" VARCHAR2(40 BYTE) NOT NULL ENABLE,
         "C4AZ_UPC" VARCHAR2(4 BYTE) NOT NULL ENABLE,
         "C4ZA_UPC" VARCHAR2(4 BYTE) NOT NULL ENABLE,
         "C4AZ_CAST" VARCHAR2(12 BYTE) NOT NULL ENABLE,
         "C4ZA_CAST" VARCHAR2(12 BYTE) NOT NULL ENABLE,
         "C4AZ_QOSINDEX" NUMBER(*,0),
         "C4ZA_QOSINDEX" NUMBER(*,0),
         "SRPROFILE" CHAR(10 BYTE) NOT NULL ENABLE,
         "SRNODE" CHAR(10 BYTE) NOT NULL ENABLE,
         "SRNETWORK" CHAR(10 BYTE) NOT NULL ENABLE,
         "SRA_TP" CHAR(10 BYTE) NOT NULL ENABLE,
         "SRZ_TP" CHAR(10 BYTE) NOT NULL ENABLE,
         "SRSOID" CHAR(10 BYTE) NOT NULL ENABLE,
         "C4_AZ_IOSQOS" CHAR(10 BYTE) NOT NULL ENABLE,
         "C4_ZA_IOSQOS" CHAR(10 BYTE) NOT NULL ENABLE
    Currently i have below indexes on this table.
      CREATE UNIQUE INDEX  "C4_PVCX_IDX" ON "PRFT1"."C4_PVCX" ("SY_OBJECTID", "SY_VERSION")
      CREATE UNIQUE INDEX    "C4_PVCX CR" ON "PRFT1"."C4_PVCX" ("SY_CHANGEORDERID", "SY_OBJECTID", "SY_VERSION")
      CREATE INDEX "C4_PVCX_CD" ON "PRFT1"."C4_PVCX" ("SY_COMMITTEDDATE")
    Execution Plan
    Plan hash value: 1884930072
    | Id  | Operation           | Name       | Rows  | Bytes | Cost (%CPU)| Time
    |
    |   0 | SELECT STATEMENT    |            |   795 | 30210 | 73650   (5)| 00:14:44
    |
    |   1 |  SORT ORDER BY      |            |   795 | 30210 | 73650   (5)| 00:14:44
    |
    |*  2 |   FILTER            |            |       |       |            |
    |
    |*  3 |    TABLE ACCESS FULL| C4_PVCX    | 15909 |   590K| 73646   (5)| 00:14:44
    |
    |*  4 |    INDEX UNIQUE SCAN| C4_PVCX_CR |     1 |    24 |     3   (0)| 00:00:01
    |
    Predicate Information (identified by operation id):
       2 - filter("C4_PVCX0"."SY_VERSION"=0 AND  NOT EXISTS (SELECT /*+ */ 0
                  FROM "PRFT1"."C4_PVCX" "C4_PVCX0" WHERE "C4_PVCX0"."SY_VERSION"=1
    AND
                  "C4_PVCX0"."SY_OBJECTID"=:B1 AND "C4_PVCX0"."SY_CHANGEORDERID"='SY
    xf0003Ga
                  ') OR "C4_PVCX0"."SY_VERSION"=1 AND "C4_PVCX0"."SY_CHANGEORDERID"=
    'SYxf000
                  3Ga')
       3 - filter("C4_PVCX0"."C4_AZ_IOSQOS"='C4ir00018}' AND
                  "C4_PVCX0"."SY_PENDOPERATION"<>2 AND
                  "C4_PVCX0"."SY_OBJECTID"<>'C4vd00F}iD')
       4 - access("C4_PVCX0"."SY_CHANGEORDERID"='SYxf0003Ga' AND
                  "C4_PVCX0"."SY_OBJECTID"=:B1 AND "C4_PVCX0"."SY_VERSION"=1)
    Statistics
              0  recursive calls
              0  db block gets
         296336  consistent gets
         294809  physical reads
              0  redo size
            466  bytes sent via SQL*Net to client
            480  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              0  rows processedThanks & Regards
    Satish
    Edited by: Satish Kumar Ballepu on May 16, 2009 2:54 AM

    before index creation. check "OR" condition in your query.
    that query means below code
    AND    ((c4_pvcx0.sy_changeorderid = 'SYxf0003Ga'AND c4_pvcx0.sy_version = 1)
                                                    OR  (c4_pvcx0.sy_version = 0)  --> rerturn rows  "sy_version=0" without sy_changeorderid condition"
            AND NOT ( c4_pvcx0.sy_objectid IN (
                                               SELECT c4_pvcx0.sy_objectid
                                               FROM   c4_pvcx c4_pvcx0
                                               WHERE  c4_pvcx0.sy_changeorderid = 'SYxf0003Ga'
                                               AND    c4_pvcx0.sy_version = 1
    {code}
    is it right?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help analyzing a single query perfomance

    Hi,
    we're using MaxDB 7.7 in a large e-commerce project.
    Recently we're having performances issues and I'm trying to understand what's the problem.
    This is the query
    select articolo2_.ID as col_0_0_, articolo2_.CODICE as col_1_0_, articolo2_.CODICEREPOSITORY as col_2_0_, articolo2_.DESCRIZIONE as col_3_0_, marchio5_.NOME as col_4_0_, articolo2_.MODELLO as col_5_0_, categoria6_.NOME as col_6_0_, unitamisur7_.DESCRIZIONE as col_7_0_, articoloco1_.ID as col_8_0_, articoloco1_.CODICE as col_9_0_, articoloco1_.STATOCOMMERCIALE as col_10_0_, articoloco1_.DATA_STATOCOMMERCIALE as col_11_0_, articolo2_.ALTRO1 as col_12_0_, articolo2_.ALTRO2 as col_13_0_, articolo2_.ALTRO3 as col_14_0_, articolo2_.ALTRO4 as col_15_0_, articolo2_.ALTRO5 as col_16_0_, articoloco1_.ATTIVO as col_17_0_, articoloco1_.LOTTOORDINE as col_18_0_, articoloco1_.MINIMOORDINE as col_19_0_, articoloco1_.SCORTAMINIMA as col_20_0_, MIN(prezzo0_.PREZZO) as col_21_0_, SUM(dispmagazz4_.DISPONIBILITA) as col_22_0_, SUM(dispmagazz4_.DISPFUTURA) as col_23_0_, iva8_.CODICE as col_24_0_, iva8_.PERC as col_25_0_, articolo2_.STIMAPESO as col_26_0_, MAX(prezzo0_.FLAG) as col_27_0_, articolo2_.COMPOSTO as col_28_0_, articoloco1_.ELEMENTO_ARTICOLOCOMPOSTO as col_29_0_, articoloco1_.DATA_CREAZIONE as col_30_0_, articoloco1_.DATA_ULTIMAMODIFICA as col_31_0_, MIN(prezzo0_.PREZZOPREC) as col_32_0_, MIN(prezzo0_.DATAPREZZOPREC) as col_33_0_, MIN(prezzo0_.PREZZOPRECNOFLAG) as col_34_0_, articolo2_.ALTEZ as col_35_0_, articolo2_.LARG as col_36_0_, articolo2_.PROF as col_37_0_, articolo2_.TAGLIA as col_38_0_, articolo2_.COLORE as col_39_0_, articolo2_.TIPOMISURE as col_40_0_, articolo2_.STIMACOLLI as col_41_0_, articolo2_.KEYWORDS as col_42_0_, MIN(prezzo0_.PREZZOIVATO) as col_43_0_, MIN(prezzo0_.PREZZOPRECIVATO) as col_44_0_, MIN(prezzo0_.PREZZOPRECNOFLAGIVATO) as col_45_0_, articolo2_.CODSTRUTTURAVARIANTE as col_46_0_, articolo2_.VARIANTE1 as col_47_0_, articolo2_.VARIANTE2 as col_48_0_, articolo2_.VARIANTE3 as col_49_0_, articolo2_.VARIANTE4 as col_50_0_, articolo2_.VARIANTE5 as col_51_0_, articolo2_.VARIANTE6 as col_52_0_, articolo2_.VARIANTE7 as col_53_0_, articolo2_.VARIANTE8 as col_54_0_, articolo2_.CARATTERISTICA1 as col_55_0_, articolo2_.CARATTERISTICA2 as col_56_0_, articolo2_.CARATTERISTICA3 as col_57_0_, articolo2_.CARATTERISTICA4 as col_58_0_, articolo2_.CARATTERISTICA5 as col_59_0_, MIN(articolifo3_.ID_PUNTOPARTENZA) as col_60_0_, iva10_.CODICE as col_61_0_, iva10_.PERC as col_62_0_, articolo2_.QTACONFEZIONE as col_63_0_, articolo2_.QTACARTONE as col_64_0_, articolo2_.QTABANCALE as col_65_0_
    from ECF3.PREZZO prezzo0_, ECF3.ARTICOLO_COMMERCIALE articoloco1_, ECF3.ARTICOLO articolo2_, ECF3.ARTICOLO_FORNITORE articolifo3_, ECF3.MARCHIO marchio5_, ECF3.CATEGORIA categoria6_, ECF3.UNITAMISURA unitamisur7_, ECF3.IVA iva8_, ECF3.IVA iva10_, ECF3.DISPMAGAZZINO dispmagazz4_, ECF3.MACROCATEGORIA macrocateg13_, ECF3.REPARTO reparto14_
    where prezzo0_.ID_ARTICOLOCOMM=articoloco1_.ID and articoloco1_.ID_ARTICOLO=articolo2_.ID and articolo2_.ID=articolifo3_.ID_ARTICOLO(+) and articolo2_.ID_MARCHIO=marchio5_.ID and articolo2_.ID_CATEGORIA=categoria6_.ID and articolo2_.ID_UM=unitamisur7_.ID and articolo2_.ID_IVA=iva8_.ID and articolo2_.ID_IVAINGROSSO=iva10_.ID and categoria6_.ID_MACROCATEGORIA=macrocateg13_.ID and macrocateg13_.ID_REPARTO=reparto14_.ID and articolifo3_.ABITUALE='S' and dispmagazz4_.ID_ARTICOLOCOMM=articoloco1_.ID and articoloco1_.ID_AZIENDA=1 and articoloco1_.ID_CANALE=9 and articoloco1_.ATTIVO='A' and prezzo0_.ID_LISTINO=47 and prezzo0_.PREZZO>0 and reparto14_.NOME='ELDOM' and (upper(articolo2_.DESCRIZIONE) like '%mp3%' or upper(articolo2_.MODELLO) like '%mp3%' or upper(articolo2_.KEYWORDS) like '%mp3%')
    group by articolo2_.ID , articolo2_.CODICE , articolo2_.CODICEREPOSITORY , articolo2_.DESCRIZIONE , marchio5_.NOME , articolo2_.MODELLO , categoria6_.NOME , unitamisur7_.DESCRIZIONE , articoloco1_.ID , articoloco1_.CODICE , articoloco1_.STATOCOMMERCIALE , articoloco1_.DATA_STATOCOMMERCIALE , articolo2_.ALTRO1 , articolo2_.ALTRO2 , articolo2_.ALTRO3 , articolo2_.ALTRO4 , articolo2_.ALTRO5 , articoloco1_.ATTIVO , articoloco1_.LOTTOORDINE , articoloco1_.MINIMOORDINE , articoloco1_.SCORTAMINIMA , iva8_.CODICE , iva8_.PERC , articolo2_.STIMAPESO , articolo2_.COMPOSTO , articoloco1_.ELEMENTO_ARTICOLOCOMPOSTO , articoloco1_.DATA_CREAZIONE , articoloco1_.DATA_ULTIMAMODIFICA , articolo2_.ALTEZ , articolo2_.LARG , articolo2_.PROF , articolo2_.TAGLIA , articolo2_.COLORE , articolo2_.TIPOMISURE , articolo2_.STIMACOLLI , articolo2_.KEYWORDS , articolo2_.CODSTRUTTURAVARIANTE , articolo2_.VARIANTE1 , articolo2_.VARIANTE2 , articolo2_.VARIANTE3 , articolo2_.VARIANTE4 , articolo2_.VARIANTE5 , articolo2_.VARIANTE6 , articolo2_.VARIANTE7 , articolo2_.VARIANTE8 , articolo2_.CARATTERISTICA1 , articolo2_.CARATTERISTICA2 , articolo2_.CARATTERISTICA3 , articolo2_.CARATTERISTICA4 , articolo2_.CARATTERISTICA5 , iva10_.CODICE , iva10_.PERC , articolo2_.QTACONFEZIONE , articolo2_.QTACARTONE , articolo2_.QTABANCALE
    order by MIN(prezzo0_.PREZZO) ASC
    and this is the explain result
    SCHEMANAME    TABLENAME           COLUMN_OR_INDEX                     STRATEGY                                  PAGECOUNT
                  UNITAMISUR7_                                            TABLE SCAN                                         1
                  PREZZO0_            PREZZO_LISTINO_idx                  JOIN VIA INDEXED COLUMN                        13655
                                      ID_LISTINO                               (USED INDEX COLUMN)                           
                  ARTICOLOCO1_        ID                                  JOIN VIA KEY COLUMN                             5401
                  REPARTO14_          IDX_NOME_MONDO                      JOIN VIA INDEXED COLUMN                            1
                                                                          TABLE HASHED                                       
                                      NOME                                     (USED INDEX COLUMN)                           
                  ARTICOLIFO3_        IDX_ARTICOLO_FORNITORE_ARTICOLO     JOIN VIA INDEXED COLUMN                         5478
                                      ID_ARTICOLO                              (USED INDEX COLUMN)                           
                  ARTICOLO2_          ID                                  JOIN VIA KEY COLUMN                             8098
                  MARCHIO5_           ID                                  JOIN VIA KEY COLUMN                                5
                                                                          TABLE HASHED                                       
                  CATEGORIA6_         ID                                  JOIN VIA KEY COLUMN                                8
                                                                          TABLE HASHED                                       
                  IVA8_               ID                                  JOIN VIA KEY COLUMN                                1
                                                                          TABLE HASHED                                       
                  IVA10_              ID                                  JOIN VIA KEY COLUMN                                1
                                                                          TABLE HASHED                                       
                  DISPMAGAZZ4_        DISPMAGAZZINO_IDARTICOLOCOMM_IDX    JOIN VIA INDEXED COLUMN                          801
                                      ID_ARTICOLOCOMM                          (USED INDEX COLUMN)                           
                  MACROCATEG13_       ID                                  JOIN VIA KEY COLUMN                                1
                                                                          TABLE HASHED                                                                               
    NO TEMPORARY RESULTS CREATED                  
    INTERNAL      TEMPORARY RESULT                                        TABLE SCAN                                         1
                  JDBC_CURSOR_54                                               RESULT IS COPIED   , COSTVALUE IS        289903
    The query takes an average of 25 seconds in working hours. It returns 611 rows. MaxDB 7.7 running on Linux, 2 processors, 4 cores each, 32GB Ram. Cache size is 4GB for this db and data size is about 5GB. Cache hit 100%.
    What I'm not sure is if the query is already optimized and the problem is the workload on the server or the query can be optimized.
    The query is generated by Hibernate so I really can't tweak the SQL.
    Thank you for any suggestion !

    Dear Lars,
    thanks for your help.
    I think the problem is on some joins because removing them and using an added field in place of them (de-normalyzing information) the query is much faster.
    First, all the joins are backed by indexes with integer keys.
    These are the tables involved  (i removed the fields not related to joins for clarity), query time are not average, they're a single run times in working hours :
    CREATE TABLE ECF3.ARTICOLO (
         ID INTEGER NOT NULL,
         DESCRIZIONE VARCHAR() ASCII(512) NOT NULL,
         MODELLO VARCHAR() ASCII(100) NOT NULL,
         KEYWORDS VARCHAR() ASCII(512),
         ID_UM INTEGER,
         ID_IVA INTEGER,
         ID_IVAINGROSSO INTEGER,
         ID_CATEGORIA INTEGER,
         ID_MARCHIO INTEGER,
         PRIMARY KEY (ID)
    The table contains 115.729 rows, 4.857 rows match the search condition on this table fields, like on '%MP3%' (query runs in 0.4 sec).
    CREATE TABLE ECF3.ARTICOLO_COMMERCIALE (
         ID INTEGER NOT NULL,
         ID_AZIENDA INTEGER,
         ID_CANALE INTEGER,
         ID_ARTICOLO INTEGER,
         ATTIVO CHAR() ASCII(1) NOT NULL,
         PRIMARY KEY (ID)
    The table contains 413.916 rows, 45.086 rows match the search condition on this table field, ID_AZIENDA=1, ID_CANALE=9, ATTIVO='A' (query runs in 0.48 sec).
    CREATE TABLE ECF3.ARTICOLO_FORNITORE (
         ID INTEGER NOT NULL,
         ABITUALE CHAR() ASCII(1),
         ID_ARTICOLO INTEGER,
         PRIMARY KEY (ID)
    The table contains 115.503 rows, all match the search condition on this table field, ABITUALE='S' (query runs in 0.7 sec).
    CREATE TABLE ECF3.PREZZO (
         ID INTEGER NOT NULL,
         PREZZO FIXED(14,3),
         ID_LISTINO INTEGER,
         ID_ARTICOLOCOMM INTEGER,
         PRIMARY KEY (ID)
    The table contains 2.246.518 rows, 58.396 match the search condition on this table field, ID_LISTINO=47 AND PREZZO>0 (query runs in 0.4 sec)
    CREATE TABLE ECF3.DISPMAGAZZINO (
         ID_MAGAZZINO INTEGER NOT NULL,
         ID_ARTICOLOCOMM INTEGER NOT NULL,
         PRIMARY KEY (ID_MAGAZZINO,ID_ARTICOLOCOMM)
    Table contains 404.664 rows, no conditions on query, only joins with other table ARTICOLO_COMMERCIALE.
    There are then the smaller tables
    CREATE TABLE ECF3.REPARTO (
         ID INTEGER NOT NULL,
         NOME VARCHAR() ASCII(100) NOT NULL,
         PRIMARY KEY (ID)
    CREATE TABLE ECF3.MACROCATEGORIA (
         ID INTEGER NOT NULL,
         NOME VARCHAR() ASCII(100) NOT NULL,
         ID_REPARTO INTEGER DEFAULT           0 NOT NULL,
         PRIMARY KEY (ID)
    CREATE TABLE ECF3.CATEGORIA (
         ID INTEGER NOT NULL,
         ID_MACROCATEGORIA INTEGER NOT NULL,
         NOME VARCHAR() ASCII(100) NOT NULL,
         PRIMARY KEY (ID)
    This is a 'tree', reparto has only 5 rows, macrocategoria has 29 rows, categoria has 1120 rows. The search condition on reparto gets to 765 categoria rows.
    CREATE TABLE ECF3.MARCHIO (
         ID INTEGER NOT NULL,
         NOME VARCHAR() ASCII(100) NOT NULL,
         PRIMARY KEY (ID)
    The table contains 1189 rows
    CREATE TABLE ECF3.IVA (
         ID INTEGER NOT NULL,
         PRIMARY KEY (ID)
    This table contains 15 rows.
    CREATE TABLE ECF3.UNITAMISURA (
         ID INTEGER NOT NULL,
         PRIMARY KEY (ID)
    This table contains 6 rows.
    The CATEGORIA, MARCHIO, MACROCATEGORIA, REPARTO was added later to the structure. Before this we had a field CATEGORIA, MARCHIO, REPARTO in the ARTICOLO table.
    Using the fields instead of the joins the query is fast (2 sec.). Adding these tables has slowed down to 25 sec. (15 in non working hours).
    This is what I don't understand, they're small tables, I understand the joins add complexity but the time difference between the two version of the model is very high !
    Thanks for help and sorry for the long post.

  • Query Perfomance - Time, Read Texts

    Hi all,
    I have an performance issue regarding an BI 7 Webtemplate. Most of the time is used to read texts. Is there a way to speed this up? Due to BIA everything else is nicely fast.
    21510 ms: OLAP Frontend Events
    55 ms: Nicht zugeordnet  (0)
    156 ms: Process request  (12600)
    44 ms, 947415: Display content  (12605)
    1 ms: RFC BICS_PROV_GET_RESULT_SET (10000)
    1 ms: OLAP sonstige Zeit xxx (3999)
    11 ms: Cache lesen xxx (2505)
    25 ms: Cache schreiben xxx (2510)
    2 ms: Cache-Erzeugung xxx (2500)
    142 ms: Datamanager xxx (9000)
    10 ms: OLAP: Datenselektion xxx (3110)
    3 ms, 605: OLAP: Daten lesen xxx (3100)
    -> 20601 ms: OLAP: Texte lesen xxx (3900) <-
    179 ms, 1210: OLAP: Datentransfer xxx (3200)
    12 ms: Abap DP Result Set  (13054)
    218 ms: Abap DP Ausgabe  (13055)
    18 ms, 1210: Get provider result set  (13040)
    31 ms, 1180: Get result set  (13004)
    1 ms: RFC RSBOLAP_BICS_STATISTIC_INFO (10000)
    Cheers, Miroslav.
    Edited by: Miroslav Simunic on May 6, 2009 3:58 PM

    Hello,
    Try to restrict the query with more selections and try to select small number of records.
    navigation attr and infoobjects will not have much impact.
    Right now the query is selecting lots of records so try to reduce it by having more selections in the query.
    Thanks
    Ajeet

  • Required query perfomance tuning which has START WITH CONNECT BY PRIOR

    Hi,
    I have below small query and the CDDS table with 40+ million records.
    SELECT -LEVEL, COMPONENT_ID, COMPONENT_TYPE, COMPONENT_STATUS,
    PARENT_COMPONENT_ID, PARENT_COMPONENT_TYPE, other_info
    BULK COLLECT INTO ltbl_cdds_rec
    FROM CDDS
    START WITH
    PARENT_COMPONENT_ID IN
    ( SELECT dns_name
    FROM RAS_CARD
    WHERE ras_name = <<INPUT_PARAMATER>>
    AND parent_component_type = 'CT_NRP')
    CONNECT BY PARENT_COMPONENT_ID = PRIOR COMPONENT_ID;
    To process this query, its taking 3 hours.
    Please suggest the way forward to tune the query for better performance.

    Create statement for CDDS:
    CREATE TABLE CDDS
    COMPONENT_TYPE VARCHAR2(30 BYTE),
    COMPONENT_ID VARCHAR2(255 BYTE),
    PARENT_COMPONENT_TYPE VARCHAR2(30 BYTE),
    PARENT_COMPONENT_ID VARCHAR2(255 BYTE),
    COMPONENT_VERSION_NO VARCHAR2(30 BYTE),
    COMPONENT_STATUS VARCHAR2(30 BYTE),
    ODS_CREATE_DATE DATE,
    ODS_LAST_UPDATE_DATE DATE,
    OTHER_INFO VARCHAR2(255 BYTE)
    TABLESPACE APPL_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING
    ENABLE ROW MOVEMENT;
    Create statement for RAS_CARD:
    CREATE TABLE RAS_CARD
    RAS_NAME VARCHAR2(20 BYTE),
    SLOT VARCHAR2(2 BYTE),
    RAS_CARD_ID VARCHAR2(30 BYTE),
    CARD_TYPE VARCHAR2(5 BYTE),
    IP_ADDRESS VARCHAR2(15 BYTE),
    DNS_NAME VARCHAR2(255 BYTE),
    STATUS VARCHAR2(15 BYTE),
    NRP_NO CHAR(2 BYTE),
    NRP_TOTAL_ALLOC_CAPACITY NUMBER(10),
    CREATED_BY VARCHAR2(10 BYTE),
    NRP_ALLOCATED_CAPACITY NUMBER(10),
    NIDB_DRA2_KEY VARCHAR2(15 BYTE),
    NIDB_DRN1_KEY CHAR(6 BYTE),
    ODS_CREATE_DATE DATE,
    LAST_UPDATED_BY VARCHAR2(10 BYTE),
    ODS_LAST_UPDATE_DATE DATE,
    WATERMARK NUMBER(38)
    TABLESPACE APPL_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    NOMONITORING;
    Explain Plan for the below query:
    select * from CDDS
    where PARENT_COMPONENT_ID IN
    ( SELECT dns_name
    FROM RAS_CARD
    WHERE ras_name = <<INPUT_PARAMATER>>
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 107 | 12 | | |
    | 1 | TABLE ACCESS BY INDEX ROWID| CDDS | 1 | 62 | 1 | | |
    | 2 | NESTED LOOPS | | 1 | 107 | 12 | | |
    | 3 | SORT UNIQUE | | | | | | |
    |* 4 | TABLE ACCESS FULL | RAS_CARD | 4 | 180 | 6 | | |
    | 5 | PARTITION RANGE ITERATOR | | | | | KEY | KEY |
    |* 6 | INDEX RANGE SCAN | CDDS_I02 | 10 | | 1 | KEY | KEY |
    ---------------------------------------------------------------------------------------------

  • How to check all rows and colums runtime executing BW query

    Hi Guys,
    I have a BW query with many calculated key figures. while execute this query the performance is really bad/slow. I need to know in which object the query is taking long time, is there any table or anything to get this information. I have looked all the query perfomation stuffs, everything looks good, just want to figure out what is making OLAP runtime longer.
    Thanks,
    Kris

    Hi Krish,
    You can not check the time taken by any particular key figure/ characteristics.
    However, if you really want to reduce the time, you can create aggregates proposed by SAP based on your query.
    First go to RSRT, place your query and click on "Execute + Debug".
    Then select "Display Aggregate Found" under Aggs and "Display Statistics Data" under Others in the "Debug Options".
    Now it will show you how you should create your aggregate based on different objects so that the total query execution time will be less.
    Also after clicking on BACK button you can check the time taken by each event during Query execution.
    Hope it helps.
    Thanks,
    Subrat.

  • Partition

    I have a table that has telephone number and subscriber details.
    Subscriber_table
    subscriber_id
    tel_no (e.g 416 888 224)
    address
    pin
    This is a massive table having millions of records.The table is indexed on tel_no ,yet when a search is made on telephone number the sql takes long time to finish.
    Wondering if I partition it say subscriber whose telephone area code start with 416 should go on partition 1 ,area code 905 partition 2...
    does this partition make sense considering I already have index on tel_no.Will it make my search faster.
    thanks in advance

    Hmmm my $0.02 worth
    I work with Telco billing systems, and deal with similar problems all day. 10 Million rows is not over the top, you should easily get get sub-second returns.
    In my experience, partitioning will be of marginal value. As phone numbers are unique, (or near unique) therefore an index should be highly selective and return a single row. it's rare to do any sort of range scan or filtering on phone numbers, or perform any sort of group or aggregate function either.
    Of course it depends upon how you are using your data, Also depending on how many users are hitting the same table and how. (is it an application? or a script?) Are you also searching on other fields which are not indexed.?
    Is your query perfoming any function on the indexed field? I have seen queries using trim() refuse to use an index.
    If you have an application like an ASP page executing dynamic sql, you would be much better off using a stored proc with bind variables.
    I suggest you update your statistics, rebuild your indexes and start tuning from there.
    I'd be very interested in seeing how you get on.
    Good luck :)
    Edited by: peetmoore on 23-Jun-2009 19:10
    Edited by: peetmoore on 23-Jun-2009 19:13

  • Database Performance task

    Hi,
    Who takes up the task of database performance tuning....is it the BW consulant or anyother?
    Thanks

    JB
    We actually never involve in Database performance tuning!, All the time DBA will handle the
    database tuning according SAP notes. We all the time involve in loading and query perfomance issues.
    Srinivas.D

  • Report based on two (or more) views

    Hi,
    Situation is this - I have two views, which have same type and number of rows. My goal is to create a report which has one bind variable (let's say ':query_nr') so, that when :query_nr=1 then report shows data only from the first view, and when :query_nr=2 then only from the second view. I know that the operator UNION ALL
    would do the job:
    select * from view_1 where :query_nr = 1
    UNION ALL
    select * from view_2 where :query_nr = 2
    but since the amount of data is large, then the execution time is unacceptable.
    Is there any other way to approach?
    Thanks in advance,
    Madis

    How does the query perfom from sqlplus. There is no way we can make a query execute faster from a portal report than it does from sqlplus.
    There are a few things you can try out like
    1. having not too many rows per page
    2. using a text format
    3. not using condtional formatting

  • Tool for BI monitoring within BI

    Hello All,
    Is there any tool to monitor BI Performance within BI.Request you to please tell me the functionality of this Tool also.
    Thanks

    hello,
    It depends on wht type of performance you would like to see: Query Perf. ,data load Perf. , Server Perf.
    1.BI Admin Cockpit which can be used for monitoring system performance and statistics.
    check the link for BI AdminCockpit for performance monitoring:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90080703-4331-2a10-cd98-9c1e95acdea0
    2.Take a tour in performance tuning site and check the presentation below.
    FAQ - The Future of SAP NetWeaver Business Intelligence in the Light of the NetWeaver BI&Business Objects Roadmap
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    Reg Tcodes for the same:
    Data Loading:
    RSMON - Also accessible from the Infopackage Scheduler
    ST05 - SQL Trace Analysis - can be useful to trace your ABAP code used in your transformations.
    Query Perfomance:
    ST03 - BW Workload Monitor - used in order to display many statistics on the BI system. This is the place to start if you have a monitor problem.
    RSRT - Query Monitor
    The following transactions might be useful in order to troubleshoot performance issues related to the BW DB server:
    DB02 - Database monitor
    ST04 - Database Server Performance Analysis
    Reg,
    Dhanya

  • Perfomance Based on Infocube creation or Bex Query creation

    Hi,
    I just wanted to know is there any performance is affected whether Universe is created on top of Bex query or on top of Infocube.
    Out of these which is the Best practice to follow.
    Regards
    Gaurav

    This is the best practice to follow
    build your universe on top of Query not direct infocube
    this will keep the row level security applied.
    the performance will depend on how you design your query and the amount of data to be retrieved from the infocube.
    good luck

  • How to Improve perfomance of this query

    Hi,
    Please help me to improve this query performance. Objective of this query is to find out individual count who order the product in last two year and create a matrix with time period
    Challenge is Both the table having more than 600 million record so it is taking to much time to execute
    SELECT count(unique b.individual_id),
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955'))>= SYSDATE - 45 THEN 1 ELSE 0 END )) AS one_month ,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955'))>= SYSDATE - 105 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 45 THEN 1 ELSE 0 END )) AS Three_month,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 195 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 105 THEN 1 ELSE 0 END )) AS six_month,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 380 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 195 THEN 1 ELSE 0 END )) AS one_year,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 745 and NVL(ORDER_DT,TO_DATE('05-MAY-1955'))<= SYSDATE - 380 THEN 1 ELSE 0 END )) AS two_year
    from ORDER b, address a
    where b.individual_id = a.individual_id
    and a.COUNTRY_CD ='US'
    group by a.COUNTRY_CD ;
    Thanks
    Neeraj
    Edited by: user4522368 on Aug 17, 2010 12:10 AM

    user4522368 wrote:
    Hi,
    Please help me to improve this query performance. Objective of this query is to find out individual count who order the product in last two year and create a matrix with time period
    Challenge is Both the table having more than 600 million record so it is taking to much time to execute Dombrooks has provided you with an excellent response.
    In addition, you should mention how much time the query is currently taking and how much do you expect it to take, what is your database version etc.
    One of the most important thing is to post your SQLs and EXPLAIN PLAN outcomes in readable format. You can do this by wrapping it within \ and \ tags.
    Now, based on the limited details that you have provided, following are my questions/observations:
    a) You claim that both tables have more than 600 million rows but your plan shows that optimizer is expecting to find only 46 million rows in ORDER table. You may want to confirm if statistics on both the tables are correct.
    b) Your plan appears to suggest that the UNIQUE is not affecting the query results. Based on your knowledge of your data, do you need the COUNT(UNIQUE individual_id) or can it be just COUNT(individual_id)?
    c) Finally, if you are interested in only last two years of data, you should probably have a WHERE predicate on your ORDER table which filters data based on ORDER_DT. Something like following:
    SELECT count(unique b.individual_id),
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955'))>= SYSDATE - 45 THEN 1 ELSE 0 END )) AS one_month ,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955'))>= SYSDATE - 105 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 45 THEN 1 ELSE 0 END )) AS Three_month,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 195 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 105 THEN 1 ELSE 0 END )) AS six_month,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 380 and NVL(ORDER_DT,TO_DATE('05-MAY-1955')) <= SYSDATE - 195 THEN 1 ELSE 0 END )) AS one_year,
    sum((CASE WHEN NVL(ORDER_DT,TO_DATE('05-MAY-1955')) >= SYSDATE - 745 and NVL(ORDER_DT,TO_DATE('05-MAY-1955'))<= SYSDATE - 380 THEN 1 ELSE 0 END )) AS two_year
    from ORDER b, address a
    where b.individual_id = a.individual_id
    and a.COUNTRY_CD ='US'
    and b.ORDER_DT <= (SYSDATE - 380)
    group by a.COUNTRY_CD ;

  • Perfomance Tunig VisualVM, Query Console - Search using OQL?! What is an ov

    Hi,
    I am currently Profiling a Java Application with Java VisualVM (JDK 6.0.25)
    When you use that tool to create a Heap Dump you can inspect the data in memory, that is nice but of course you can hardly click through 250.000 items to see if what class the chars/strings whatever belongs to.
    But luckily there is a SQL like query editor ... however the syntax is bit tricky:
    What I am searching for is all chars/strings that belong to a class called "ErrorPrinter".
    How would you define such query?
    Further: There is a sample query to find out "Overallocated String" ... well either my english is not good enough or I don't know ... but can anybody explain: What is an overallocated String and how to resolve that?
    I have read the http://visualvm.java.net/oqlhelp.html but it does not contain so much ...
    Thank you very much,
    Sebastian Wagner

    Thanks for your answer,
    I understand now the meaning of overallocated in that sense,
    the use-case for the search that I would like to perform in the Query Console is:
    I made a HEAP-Dump using VisualVM, now I analyze the Heap-Dump.
    char[] is the biggest memory consumer in that HEAP-Dump. Each char has some references, if you click through those references at some point you will reach a class that is part of my code.
    Now I would like to find out which classes do have the upmost consumers of "char" references in the HEAP-Dump.
    For example I have a class ErrorEvaluatorAsciiText that has an attribute "String" now I want to search the heap if there is any (and how many / size) of that String stored in the HEAP-Dump.
    Select count(s) from java.util.char where s.reference=ErrorEvaluatorAsciiText
    I can perform a query like:
    select o from char[] o where o.rererence=String
    but I can't do any query like:
    select o from java.lang.String o where o.rererence=StromElement
    Results in:
    Please, check the oql queryjavax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "StromElement" is not defined. (#1)
    => But actually of course the interesting part for me is to see how many string-instances of the current heap have referals this class.
    or for example:
    select o from int[] o where o.rererence=SimpleVisitable
    or
    select o from int[] o where o.rererence=priorityWasSetForVisitNr
    But actually from the VisualVM "Instances" view I can see that there is at least one int[] that has Type SimpleVisitable or Field priorityWasSetForVisitNr as reference.
    Even better of course would be a query that gives me the top10 references of char[] in my code...
    Hope this explains my problem ...
    Thanks!
    Sebastian

  • BW perfomance - query Frontend

    Hello
    I have a problem.
    form st03n
    my query
    have
    40% OLAP%
    10% DB
    50% front end.
    What would the problem?
    If I create the aggregate, we can't solve the problem right?
    What is the flow?
    ->frontend input -> olap -> Db -> olap -> frontend output?
    Regards
    Dank

    Hi Dank
    Why OLAP is high you already know from the previous replies.
    I am concerned about Front End now.
    Is this for all the queries?
    Do you see network problem?
    While you are running the query is it stuck in gateway? ( please involve your basis to check this).
    Are you transferring lot of records ?
    Please also open the Query Designer and let me know what is the settings for "Access type of Result Rows" for all the characteristics being used in the query. You would find this is "Advanced" tab for a Characteristics
    Aggregate should not help here as the time being consumed is 10% only and SAP recommends aggregate if the time is more than 30% .
    Can you please also run the query from RSRT in debug mode ( with Display Statistics option) and give the value of DBTRANs and DBSEL ?  That will tell you if you need an aggregate or not
    BW : Aggregates
    Regards
    Anindya

  • Perfomance on query

    Hi,
    I have this table with 10.000.000 Records.
    Col1, Col2, Col3, Col4, Col5, Col6
    PK - Col1, Col2, Col5
    I want to perform this query:
    select * from <table> where
    col1 < 1250000
    order by col1, col5 desc
    Wich indexes will speed up this process?
    Thanks

    also try to use the column name in the select statement instead of * ....it will b faster....but after creating index as per the explain plan

Maybe you are looking for