Query performanz due to Unit Conversion

Hello,
I have the requirement to improved the performance of some queries with unit conversion. Could someone help me with How Tos or Tipps to solved this issue?
Thanks in advance
KmerSoft

Hi
Thanks for the reply. After a lot more googling- it turns out this is a general Oracle problem and is not solely related to use of the GEOMETRY column. It seems that sometimes, the Oracle optimiser makes an arbitrary decision to do bitmap conversion. No amount of hints will get it to change its mind !
One person reported a similarly negative change after table statistic collection had run.
Why changing the columns being retrieved should change the execution path, I do not know.
We have a numeric primary key which is always set to a positive value. When I added "AND primary_key_column > 0" (a pretty pointless clause) the optimiser changed the way it works and we got it working fast again.
Chris

Similar Messages

  • Unit Conversion in Info Set Query

    Hello Experts
    I have create a query on infoset in which I want to show the qty field with the unit conversion factor . but I am not able to do so.
    It is giving an error message while saving the query
    0Material is not a valid characteristics for Info provider ZINFOSET
    Diagnosis
    Customer enhancement RSR00002 or the implementation of BAdI RSR_OLAB_BADI delivers 0MATERIAL as the characteristic to be calculated. 1. is, however, not a valid key figure for InfoProvider ZIS_BILL.
    System Response
    The information from 0MATERIAL is ignored.
    Procedure
    Check the exit.
    Procedure for System Administration
    Please help me out
    Thanks
    Neha

    Hi,
    You can try unit conversion planning function,create planning function and add it at the back of button.
    Can refer to link below:-
    Not sure if it can solve your problem.As it also depends upon source and target keyfigure used.
    http://help.sap.com/saphelp_nw70/helpdata/en/44/21643cedf8648ee10000000a1553f7/content.htm

  • Unit Conversion in Query Designer

    Hi All,
    In one of my report, i have to show the gross weight in column against material which i am reading from material master.
    Now the weight is stored in two different unit's KG & G.
    But i have to show the weight finally in KG.
    Does any body has any idea of performing unit conversion at Query level i.e. in Query Designer.
    Thanks.

    Rakesh the same i am doing, that is reading the weight value from material master through formula variable using replacement path.
    Now when i create a key figure like this, there is a tab of 'Conversion' in that there is mentioned the 'Unit conversion'
    In there, there are 2 options
    1. Conversion type - this is a drop down but with no vlaue
    2. Target Unit - Where i selected KG.
    But output remains the same, i.e. in KG.
    M I missing something ?

  • Unit Conversion in the Query

    Hello Experts.
    I have a situation where I need the units of quantity to be converted at the query level. For e.g. if the value of the keyfigure is stored in litres in the Cube, then at the time of the query execution this value should be converted in gallons.
    I cannot use the following options in this case:
    1) The Solution for alternate UOM using the How-to guide for the same as the conversion from liters to gallons is not maintained at the material master level in my case
    2) I cannot use the Unit Conversion in the Conversion tab because gallons won't be the only target unit in my report, it will depend on the type of material select by the user.
    Please let me know about the options in this case. Any sort of help is appreciated and points will be duly rewarded.
    Thanks,
    Rishi

    Hi Prasad,
    In both of the ways, there should be only one target unit for them to work which is not the case in my situation. I want only specific material types to be displayed in gallons. If the User selects a different Material type then the target unit will be different.
    Any other possible solution on this one.
    Thanks,
    Rishi

  • Query Performance with Unit Conversion

    Hi Experts,
    Right now my Customer ask to me to do a improve in the runtime of some queries.
    I detect a problem in one related to unit conversion. I execute a workbook statistics and found that the time is focusing in step conversion data.
    I'm consulting all the year and is taking around 20 minuts to give us a result. I too much time. The only thing in the query is the conversion data.
    How can I to improve the performance? what is the check list in this case?
    thanks for you help.
    Jose

    Hi Jose,
    You might not be able to reduce the unit conversion time here and try to apply the general query performance improvement techniques, e.g. caching the query results etc.
    But there is one thing which can help you, if end user is using only one of the unit for e.g. User always execute the report in USD but the source currency is different from USD. In such cases you can create another data source and do the data conversion at the time of data loading so that in the new data source all data will be available in required currency and no conversion will happen at runtime and will improve the query performance drastically.
    But above solution is not feasible if there are many currencies and report needs to be run in multiple currency frequently.
    Regards,
    Durgesh.

  • Unit Conversion in Input Ready Query

    Hi Experts,
    I need to do unit conversion in Input ready query. here is the requirement.
    I have 3 columns in report, 'Year to Last Month', 'This Month' and 'YTD'. In this, 'This Month' is input ready. and YTD is sum of the first two collumns. I have a variables 'This Month' and 'Unit'. User may enter units either in Litres and HectoLitres. depends on the user input, i should get the values converted to corresponding units.
    currently, if i use Litres, i am able to get the result in Litres, when i select in HectoLitres, i should be able to convert the values in HL. please let me know if this possible and how.
    Thanks in advance!
    Best Regards,
    Ali.

    Hi,
    You can try unit conversion planning function,create planning function and add it at the back of button.
    Can refer to link below:-
    Not sure if it can solve your problem.As it also depends upon source and target keyfigure used.
    http://help.sap.com/saphelp_nw70/helpdata/en/44/21643cedf8648ee10000000a1553f7/content.htm

  • Very Slow Query due to Bitmap Conversion

    I have a strange problem with the performance of a spatial query. If I perform a 'SELECT non_geom_column FROM my_table WHERE complicated_join_query' the result comes back sub-second. However, when I replace the column selected with geometry and perform 'SELECT geom_column FROM my_table WHERE same_complicated_join_query' the response takes over a minute.
    The issue is that in the second case, despite the identical where clause, the explain plan is significantly different. In the 'select geom_column' query there is a BITMAP CONVERSION (TO ROWIDS) which accounts for all of the extra time, where as in the 'select other_column' query that conversion is replaced with TABLE ACCESS (BY INDEX ROWID) which is near instant.
    I have tried putting in some hints, although I do not have much experience with hints, and have also tried nesting the query in various sub-selects. Whatever I try I can not persuade the explain plan to drop the bitmap conversion when I select the geometry column. The full query and an explanation of that query are below. I have run out of things to try, so any help or suggestions at all would be much appreciated.
    Regards,
    Chris
    Explanation and query
    My application allows users to select geometries from a map image through clicking, dragging a box and various other means. The image is then refreshed - highlighting geometries based on the query with which I am having trouble. The user is then able to deselect any of those highlighted geometries, or append others with additional clicks or dragged selections.
    If there are 2 (or any even number of) clicks within the same geometry then that geometry is deselected. Alternatively the geometry could have been selected through an intersection with a dragged box, and then clicked in to deselect - again an even number of selections. Any odd number of selections (i.e. selecting, deselecting, then selecting again) would result in the geometry being selected.
    The application can not know if the multiple user clicks are in the same geometry, as it simply has an image to work with, so all it does is pass all the clicks so far to the database to deal with.
    My query therefore does each spatial point or rectangle query in turn and then appends the unique key for the rows each returned to a list. After performing all of the queries it groups the list by the key and the groups with an odd total are 'selected'. To do this logic in a single where clause I have ended up with nested select statements that are joined with union all commands.
    The query is therefore..
    SELECT
    --the below column (geometry) makes it very slow...replacing it with any non-spatial column takes less than 1/100 of the time - that is my problem!
    geometry
    FROM
    my_table
    WHERE
    primary_key IN
    SELECT primary_key FROM
    SELECT primary_key FROM my_table WHERE
    sdo_relate(geometry, mdsys.sdo_geometry(2003, 81989, NULL, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array( rectangle co-ords )), 'mask=anyinteract') = 'TRUE'
    UNION ALL SELECT primary_key FROM my_table WHERE
    sdo_relate(geometry, mdsys.sdo_geometry(2001, 81989, sdo_point_type( point co-ords , NULL), NULL, NULL), 'mask=anyinteract') = 'TRUE'
    --potentially more 'union all select...' here
    GROUP BY primary_key HAVING mod(count(*),2) = 1     
    AND
    --the below is the bounding rectangle of the whole image to be returned
    sdo_filter(geometry, mdsys.sdo_geometry(2003, 81989, NULL, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array( outer rectangle co-ords )), 'mask=anyinteract') = 'TRUE'

    Hi
    Thanks for the reply. After a lot more googling- it turns out this is a general Oracle problem and is not solely related to use of the GEOMETRY column. It seems that sometimes, the Oracle optimiser makes an arbitrary decision to do bitmap conversion. No amount of hints will get it to change its mind !
    One person reported a similarly negative change after table statistic collection had run.
    Why changing the columns being retrieved should change the execution path, I do not know.
    We have a numeric primary key which is always set to a positive value. When I added "AND primary_key_column > 0" (a pretty pointless clause) the optimiser changed the way it works and we got it working fast again.
    Chris

  • Problem in 2 level Unit conversion using ref IO

    Hi All,
    I am doing UoM conversion using conversion types - dynamic conversion using reference info object.
    Now in the UoM DSO, which stores the conversion factors, I have relation between 2 units say PC (pieces, dimensionless) and KG (kilogram, dimension = MASS) for some material.
    For e.g I have  1 Pc of material A = 2 KG.
    So if the existing qty key figure has unit PC in IC and the reporting unit given by me is KG, successful conversion takes place using the UoM DSO.
    E.g. 4 PC of Mat A is displayed as 8 KGs.
    Also if existing unit in IC is KG, and RU is 'g' conversion is taking place usion tghe system CUoM table T006.
    E.g. 2 KG is displayed as 2000 g.
    I selected the third option when creating Conv Type, i.e. first look in ref IO then T006. Hence the above results.
    But if the existing qty key figure has unit PC and if the reporting unit given is 'g' or some other MASS unit, conversion is not taking place. Ideally it should first look into the DSO table to convert 'PC' to 'KG', then look the T006 table to convert 'KG' to 'g', but this is not happening.
    E.g. 4 PC of mat A isn't shown as 8000 g. It is still shoeing as 4 PC.

    Hi Shai,
    It sometimes show without all the screens, I guess u should refresh.
    Anyway,
    Try running the query thorugh RSRT with Debug, with a breakpoint on currency/quantity conversion. I would suggest to restrict the test query to show only one record that should be converted so the debugging would be easier.
    Anyway, Have fun.

  • Quantity and Unit conversions

    Hi Experts,
    I have an inventory report in which i have three columns (Total cost per unit, Stock Quantiy and stock values)
    Total Cost per unit is in EUR  -- currency conversion exists in the report level.
    Stock Quantity in KG/PC/LB  - Unit conversion exists at report level.
    Stock value in EUR     -- Multiplication of Total cost per unit and stock quantity.
    In my case, Total cost per unit and Stock quantities are coming from different Infocubes on top of which a MP is designed.
    When i change the UOM from KG to G or PC or LB, Stock Quantiy values are changing accordingly.
    However the Stock value is also changing which should not happen because realistically Stock value in EUR for a specific material and plant combination should always be same irrespective of any UOM(KG/G/PC/LB) for the keyfigure "Stock Quantity".
    I am wondering if it possible to change the "Total cost per unit" value in the report according to the change in UOM.If so can you provide me your valuable inputs?
    Quick help is highly appreciated.
    Best Regards
    Nag

    hi,
    Please use CKF's for all the three values, currently it might be changing as it might be a simple formula i.e. a = b*c.
    if b changes then a is bound to change.
    create CKF without any currency conversion. apply the calculations in CKF.
    In the end use CKF in the report and apply the conversions after adding them in the query column.
    regards,
    Arvind.

  • Unit conversion (days to hours)

    Hello,
    I have got a question concerning unit conversion in integrated planning.
    I created a key figure called "workload" and asigned the UnitInfoObject "0unit". Two input-ready queries are available in order to plan the workload in two different units of measurements. One allows planning in hours and the other in days. Furthermore, I would like to have the planned data only in the unit "hours" available in the InfoCube. This requires a unit conversion in some place for the input-ready query that retrieves workload data in days. I am not sure, if a planning function is the appropriate manner to solve this issue. The conversion factor should be 8 as 1 working day is equal to 8 working days.
    Can anybody explain me how to do that? The sap.help.com is not very expressive in respect with this issue!
    I found a "HowTo" paper in sdn. Apparently, you have to maintain an InfoObject in order to convert the data. I do not understand why you need an InfoObject as a the conversion is a simple factor (in this case times 8 ). 
    Thanks in advance!
    Mario
    Edited by: Mario Di Marzo on Dec 15, 2008 6:44 PM

    you can use a FOX formula for that

  • Question about unit conversion for BAPI_PO_CREATE1...

    Hello Experts,
    How do we bypass/supress the unit conversion in BAPI 'BAPI_PO_CREATE1'? Because what is happening
    right now is for example, I input in 88CV it will convert it to 'EA' as this is defined as the
    PO unit of measure. I want the 88 CV to be as it is.
    Also, I am manually populating the net price(net_price) with my own value as I do not want to get
    the net price from the info record. But it comes back as 0. I populate the 'X' fields as to let you know.

    This conversion takes place due to SPRO setting
    ask your functional people to do that
    goo SPRO->reference img->sap netweaveer->check units of measurement
    cheers
    s.janagar

  • Unit Conversion Using RSUOM

    Hi, this i have already posted but i didn’t got helpful suggestions...
    plz help me to resolve this...
    I am using BW7.0's feature - Quantity Conversion (TCode: RSUOM).
    I am Traying to Convert all the Quentity Units to one Unit , I have followed the following Steps.
    Steps :-
    1)     In the BEx Tab page of Characteristic 0MATERIAL, maintained the field "Base Unit of Measure" as 0BASE_UOM
    2)     In the BEx Tab page of Characteristic 0MATERIAL, maintained the field "Unit of Measure for Char." by click on the New button, it will generate a DataStore Object, which will store information for calculating the conversion factor.
    3)     I have created Transformation from 0MAT_UNIT_ATTR to Generated DSO
    4)     The Mapping is
    MATNR ---> 0MATERIAL. ( Material )
    MEINH ---> 0UNIT ( Unit of Measure )
    UMREZ --- >0UOMZ1D ( Counter )
    UMREN ---> 0UOMN1D ( Denominator )
    MATNR  -
    > 0BASE_UOM ( This is Lodead through Master Data )
    5)     Fill in the DataStore generated with data, using the DataSource 0MAT_UNIT_ATTR Using Transfermation and DTP.
    6)     Data is Loaded Successfully AND the Data is in Active.
    7)     Then I Created the Quantity Conversion Type through TCode RSUOM ( Eg: ZUOM ),
    In the Conversion factor Tab , The Dynemick Determinetion of Convertion Factor Option 3 I have selected with reference to 0MATERIAL InfoObject.
    8)     In UoM Tab, I have selected radio button
    Source : Info Object for Determining the Unit of Measure  ( 0MATERIAL  and Quantity Attribute 0BASE_UOM )
    Target : Fixed Unit of Measure ( CAR )
    9)     Then in Query Designer , Quantity Key Figure Properties ( Eg: 0QUANT_B ) --- > In Unit
          Conversion I have selected Conversion Type ZUOM
    When I execute the Query , it is not Converting the Units.
    I am Trying to Convery all the units in to CAR ( Cartons )
    Eg : 10 Kg = 1CAR
         1000 kg = 1 MT
    Where I am missing ? what are the Radio Buttons I have to select in RSUOM
    Thanks
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/define%2bunit%2bof%2bmeasure%2bconversions%2bin%2b0material%2bdefinition
    I check this link , i didnot find all the screens..
    Regards,
    SHAIK
    Message was edited by:
            shaik

    Hi Shai,
    It sometimes show without all the screens, I guess u should refresh.
    Anyway,
    Try running the query thorugh RSRT with Debug, with a breakpoint on currency/quantity conversion. I would suggest to restrict the test query to show only one record that should be converted so the debugging would be easier.
    Anyway, Have fun.

  • Unit Conversation

    I need help on Unit Conversation
    1) In mine requirement I have a material, material quantity & its base unit of measure this is what I have loaded in BI (From Standard Extractor).
    2) In BI query I want to see Material, itu2019s quantity in selling unit of measure.
    3) Different material will have different selling unit of measure.
    4) Mine question how to convert base unit of measure into selling unit of measure in BI at transformation level, what all prerequisite I need to do for this.
    Please guide me on this, I have gone through various link but not clear regarding same, if anyone can explain me descriptive manner that will be highly appreciated.
    Sachin

    Hi..
    Check these :
    http://help.sap.com/saphelp_nw04s/helpdata/en/1b/325d4217139041e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/27/b65c42b4e05542e10000000a1550b0/frameset.htm
    Also check this :
    Re: unit conversions
    Hope this helps.........
    Regards,
    Debjani........
    Edited by: Debjani  Mukherjee on Oct 13, 2008 7:41 AM

  • BI 7 - Units Conversion (RSUOM)

    Hi experts,
    I´m trying to use the new transaction (RSUOM) to allow users to change UOM at Query time.
    I created a conversion type at RSUOM, but it´s not working as expected in query.Using variables or fixed conversions it works fine.But user need to convert units from KWH to MWH (Megawatt hour) or to GWH ....
    For source unit of measure I use "InfoObject for Determining Unit of Measure" , and for target UOM I´m using the first option "Selection of Unit of Measure during Conv."
    Is there some step missing?
    Thanks in advance,
    Tomas Prusaczyk

    1) <b>Quantity Conversion During the Transformation</b>
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/content.htm
    2) <b>Quantity Conversion in the Business Explorer</b>
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0314eadc6a6e98e10000000a11466f/content.htm
    Hope it Helps
    Chetan
    @CP..

  • Sql query slowness due to rank and columns with null values:

        
    Sql query slowness due to rank and columns with null values:
    I have the following table in database with around 10 millions records:
    Declaration:
    create table PropertyOwners (
    [Key] int not null primary key,
    PropertyKey int not null,    
    BoughtDate DateTime,    
    OwnerKey int null,    
    GroupKey int null   
    go
    [Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
    With the following index:
    CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]    
    [PropertyKey] ASC,   
    [BoughtDate] DESC,   
    [OwnerKey] DESC,   
    [GroupKey] DESC   
    go
    Description of the case:
    For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
    following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
    declare @ownerKey int = 40000   
    select PropertyKey, BoughtDate, OwnerKey, GroupKey   
    from (    
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,       
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]   
    from PropertyOwners   
    ) as result   
    where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
    It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
    May be the slowness is due to as OwnerKey/GroupKey in the table  can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
    view.
    Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.

    create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
    insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
    from PropertyOwners
    go
    declare @ownerKey int = 1
    select PropertyKey, BoughtDate, OwnerKey, GroupKey
    from #result as result
    where result.[Rank]=1
    and result.[OwnerKey]=@ownerKey
    go
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • SP ( Sold to Party )is not in table

    Hi This is Srikanth Can Some help me when i am creating a customer master with the account group 0001 after completing all the required fields  when want to save the record i am getting an error as Sp Sold to party is not table XXXX like that only fo

  • Function o know the value of nth column of a query

    Hi, I want to create a function where the input will be some sql statement (select statement) and the output will be the the value of 2nd column(or say nth column) knowing only column position (say 2 or 3 or n) I know this is possible through DBMS_SQ

  • Songlist doesn't show after download of video podcast

    Yep, that's my problem. I downloaded the "Ratatouille" video podcast and whenever I open one of my playlists or the library I get a blank window! I can hit play and it will play whatever is in that playlist, but the pane that usually shows the list i

  • How to use Tor/Privoxy with pacman?

    Hello: Just wondering if that is possible, and how. When doing "pacman X" and checking the "netstat" I see my IP listed. Is there a way to use pacman through TOR, or, in a more general way, that each out connection goes through TOR -IM clients, actua

  • SAP NetWeaver Composition Environment 7.1

    Hi Can Any one provide any materials or links for the SAP NetWeaver Composition Environment 7.1 mail id : [email protected] I will be very thankfull for you if you provided some materials and links.. Thanks In Advance Regards Chandran S