Questions in dbms_stats parameter

Hello, I am using oracle9i.
I have couple of questions when i read this help...
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1036461
I would appreciate if any one could answers my questions.
Question1
=======
Method_opt parameter.
- AUTO : Oracle determines the columns to collect histograms based on data distribution and the workload of the columns.
- SKEWONLY : Oracle determines the columns to collect histograms based on the data distribution of the columns.
I understand about SKEWONLY. In AUTO determine the column based on data distribution and workload of the columns... What is workload of the column? Is this based on how many queries run based on that column? How does oracle track this?
Question2
======
Method_opt Parameter.
SIZE integer
My understanding is, when we specify size 1, then it creates only one bucket. Even though, we have more then one distinct value in the column.
Let us say, we have 10 distinct values in a column, if we specify SIZE 5, then it creates only 5 bucket. But we have 10 distinct values... How does this work in this scenario?
Let us say, we have 5 distinct values in a column, if we specify SIZE 10, then it creates 10 bucket. But we have 5 distinct values... How does this work in this scenario?

There is a table called col_usage$ that stores information about column usage. The dbms_stats package uses this to determine whether on not a histogram will be gathered on a given column. How it determines whether or not to gather histograms from the given data I don't know exactly.
size 1 means that there is no histogram as all values are in a single bucket.
10 Distinct values and only 5 buckets, means you get height balanced histograms and you will evenly spread sampled values through the buckets.
You will have a max and min values. The optimizer uses a formula which estimates selectivity by a range of factors such as min max value in a bucket, size of the bucket, number of values per bucket, and how popular a given value is(number of buckets value appears in)
5 Distinct values and 10 buckets, give you a frequency histograms. You will only have 5 buckets each with 1 value. There is no point in having an empty bucket. Frequency histograms are more accurate as the exact number of occurrences of a given value are known. They calculate selectivity based on the number of occurrences of a value per bucket over the total number of occurrences of all values.

Similar Messages

  • Question on the parameter type of DLL functions

    Question on the parameter type of DLL functions
    I am trying to develop an interface to control a laser with LV8.2  I am planing to use the VI “Call Library Function Node” to call the DLL and set the exact same parameters of functions in the DLL.
    According to the DLL manual of the laser, there are six functions.  One of the prototypes is:  function getstatuspointer : pointer. I don't know how to set this parameter for the function. Is there anyone who can give some hints? Thanks!
    BTW :The following is a description of the function:
    This function returns a 32 bit pointer to the STATUS data structure (Tstatusrec). In the 32 bit DLL, every application is using its own copy of the data structure (local
    memory). The data structure is a packed structure. "packed" means that the fields in the structure are not aligned on word or double-word boundaries.
    Tstatusrec = packed record
                            size : word;
                            initstat : byte;
                            queuefill : byte;
                            anzapp16 : word; (not used)
                            anzapp32 : word;
                            anzdock16 : word; (not used)
                            anzdock32 : word;
                            dll16ver : tchararray; (not used)
                            dll32ver : tchararray;
                            excimerver : tchararray;
                            excimer : TExcimerStatus;
                      end;

    Hi Jack,
    This is a good starting point when using Call Library Function node. Check out this Help Page
    Van L
    NI Applications Engineer

  • Again, ask the question of export parameter.

    Again, ask the question of export parameter.
    I wrote a java version transformation and it worked good with export parameter.
    However I can not work it out in graphical message mapping. I refered http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    In PI7.1, I add an export parameter "EXPORT_PARA" in the "Signature" tab. Are there any special step to assign this parameter to an UDF? I did not find a way to do it.
    And then I define an UDF,
    public String SetExportPara(String sss, Container container) throws StreamTransformationException{
    String str = "GOOD";
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    if(paras.exists("EXPORT_PARA ") == true) {
    paras.setString("EXPORT_PARA ", str);
    }else {
    str = "NOT FOUND EXPORT_PARA";
    return str;
    And I assign this UDF to one element of my output XML, I tried to run it in IE, it always output "NOT FOUND EXPORT_PARA.
    why?????
    I know there is a blog : https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8654. [original link is broken] [original link is broken] [original link is broken]
    But it did not talk how to set export parameters.

    close this

  • Question about destination parameter in RFC function module

    Greetings,
    For execution of RFC function module such as MD_STOCK_REQUIREMENTS_LIST_API  on local server, the destination parameter is not required or it can be DESTINATION 'NONE'. I observe that the second option is much slower than the first option. My question is why the second is much slower.
    Thanks,
    Hung

    I've tested it with se37 by leaving RFC target system blank or filling it with 'NONE' , I saw 53000 microseconds versus 45000 microseconds.
    Hung

  • Question on MAXTIME parameter on queue registration

    Hi
       I have a question regarding value of parameter MAXTIME - while registering for queues in XI . My intention is to prioritize queues - XBTA, XBTG, XBTZ with the *A queue having the maximum priority and the *Z having the least. Should I give a high value in seconds for the *A and a least value for *Z queue ? I read the definition of MAXTIME - as <b>'The MAXTIME parameter determines the time in seconds that is scheduled for processing a queue'</b> .
    So, based on the above definition , should we give a higher value of MAZTIME for queues with higher priority - could somebody elaborate ?

    Hi KARTHIK MATHRUBOOTHAM ,
    These r the details Queues Prioritization:
    Queues for Prioritized Message Processing
    http://help.sap.com/saphelp_nw04/helpdata/en/04/827440c36ed562e10000000a155106/content.htm
    Queue prioritization for XI processing queues uses a built in feature of qRFC. By specifying the maximum processing time for a queue, u can define how much  processing time a specific queue will get(this works like a time-scheduling procedure, time slicing). U can use this feature to add queues for high-priority and low-priority messages(for inbound and outbound processing). These queues are then named, for example XBT1* or XBT9* for inbound EO processing  and XBTA, XBTZ for outbound EO processing.
    This function uses the message filter concept and can be configured in transaction SXMB_ADM. U can define message filters for specific message attributes such as sender/reciever service, interface and so on. A filter can also be dependent on the message size.
    This function can also be useful in situations where a queue backlog needs to be processed, due to a system error or an error on the reciever side, for example. In this case, u can use a Prioritized queue for urgent messages that must be processed immediately, without having to process the whole back-log first.
    How to prioritize XI messages on the integration server
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20bb9649-e86e-2910-7aa9-88ed4972a5f6
    The parameter QualityOfService specifies how the Integration Engine should process a message. The following values are permitted:
    1)BE(Best Effort: synchronous processing). If QualityOfService is BE, the client is sent the final status for the processing.
    2)EO(Exactly Once: asynchronous processing with guaranteed execution exactly once). If QualityOfService is EO,processing occurs asynchronously and the client only recieves a confirmation of reciept with HTTP status '200'.
    3)EOIO(Exactly Once in Order: asynchronous processing using queues, that is, guaranteed execution exactly once and maintaining the sequence of successive messages). If QualityOfService is EOIO,processing occurs asynchronously and the client only recieves a confirmation of reciept with HTTP status '200'.
    Since u had choosen EOIO ,You must also define a queue name for EOIO:
    XI.QueueId=<QueueName>
    This queue name is used in the Integration Engine to process messages in the same sequence that they arrived in.
    This QueueName can consist of a maximum of 16 characters. If the first 8 characters contain 'SAP_ALE_', these r removed since this value is reserved by SAP and used internally.
    If a value is not specified for QualityOfService , the default value 'BE' is used.
    These r following websites which u wil find helpful:
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/d906d01f77fa40a4c84683c3f8326f/content.htm
    http://documentation.softwareag.com/crossvision/xie311/admin/config.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a8424011-0d01-0010-e19d-e5bd8ca52244
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • Question about 'direct' parameter in sql loader utility

    Hi eveyone,
    Today I was asked what the advantages and disadvantages of 'direct' parameter of sql loader.
    In my opinion, if swithing direct on, oracle use direct path load.
    And it has no difference from the append hind in insert statement.
    The core merits are less redo hence faster.
    The main shortcoming is since little redo generated, we have to ask DBA to back up the data according to the rules immediately after the loading.
    Does my answer make sense or not? Plesae help to point out the important things I missed.
    best regards,
    Leon

    Hi,
    Direct path Export is much faster than conventional path Export because the data is read from disk into the buffer cache and rows are transferred directly to the Export client.
    Some conditions to use DIRECT parameter are,
    1. The Export parameter BUFFER applies only to conventional path Exports. For direct path Export, use the RECORDLENGTH parameter to specify the size of the buffer that Export uses for writing to the export file.
    2. You cannot use direct path when exporting in tablespace mode (TRANSPORT_TABLESPACES=Y).
    3. The QUERY parameter cannot be specified in a direct path Export.
    Thanks

  • Buffer Pool Question regarding db_nk_cache_size parameter

    If I set db_nk_cache_size parameter to db_16k_cache_size=50M then I create a tablespace using blocksize=16k, will all block objects in the tablespace be automatically pooled in my 16k cache?
    Matt

    Hi..
    The values of db_keep_cache_size and db_recycle_cache_size are by default 0.You can create the RECYCLE and KEEP pools by specifying the following init.ora parameters:
    DB_KEEP_CACHE_SIZE = <size of KEEP pool>
    DB_RECYCLE_CACHE_SIZE = < size of RECYCLE pool>
    When you use the above parameters, the total memory allocated to the block buffers is the sum of DB_KEEP_CACHE_SIZE, DB_RECYCLE_CACHE_SIZE, and DB_CACHE_SIZE.
    Regards,
    Anand

  • Two questions on dynamic parameter from java API point of view

    Hi,
    We have a requirement for dynamic parameters in crystal reports that need to be executed in java application. Since, crystal java framework do not support the dynamic parameter execution (please correct me if I am wrong), we plan to execute explicitly the query for getting the dynamic values of such dynamic parameters before listing the parameters in java application.
    The query for the dynamic parameter will be given in the field 'Prompt Group Text' of the parameter.
    I coudl not get hold of these details from java api. So please some one help me out.
    Environment - Crystal X1 R2 with java libraries
    1. How can we identify a parameter is a dynamic one?
    2. How to get the 'Prompt Group Text' field value?
    Any suggestions welcome.
    Thanks,
    Ratan.

    There are these two methods in the Business Objects Enterprise SDK Developer Libary:
    byte[]   getDynamicCascadePromptData()
               Returns a collection that contains dynamic cascading prompt data. 
    java.lang.String getDynamicCascadePromptGroupID()
                            Returns a dynamic cascade prompt group ID. 
    For more information on what is available through available SDK's, please refer to the following link:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm

  • Method design question...and passing object as parameter to webserice

    I am new to webservice...one design question
    i am writing a webservice to check whether a user is valid user or not. The users are categorized as Member, Admin and Professional. For each user type I have to hit different data source to verify.
    I can get this user type as parameter. What is the best approach to define the method?
    Having one single method �isValidUser � and all the client web service can always call this method and provide user type or should I define method for each type like isValidMember, isValidAdmin ?
    One more thing...in future the requirement may change for professional to have more required field in that case the parameter need to have more attribute. But on client side not much change if I have a single isValidUser method...all they have to do is pass additional values
    isValidUser(String username, String usertype, String[] userAttributes){
    if usertype == member
    call member code
    else if usertype = professional
    call professional code
    else if usertype = admin
    call admin code
    else
    throw error
    or
    isValidMember(String username, String[] userAttributes){
    call member code
    One last question, can the parameter be passed as object in web service like USER object.

    First of all, here is my code
    CREATE OR REPLACE
    TYPE USERCONTEXT AS OBJECT
    user_login varchar2,
    user_id integer,
    CONSTRUCTOR FUNCTION USERCONTEXT (
    P_LOGIN IN INTEGER
    P_ID_ID IN INTEGER
    ) RETURN SELF AS RESULT
    Either your type wont be compiled or this is not the real code..

  • Crystal Reports 9 and SQL Server 2005 default parameter values

    We're using Crystal Reports 9 and upgraded from SQL Server 2000 to SQL Server 2005.
    I'm noticing a very weird problem which I wonder if anyone else has experienced (and hopefully found a resolution for). It appears that in using Crystal with SQL Server 2005 stored procedures, if we have default parameter values in the stored procedures, the default parameter values get completely ignored if you pass in a NULL value from Crystal!
    For example, if you have a stored procedure that begins like this:
    ALTER          Procedure [dbo].[StoredProcedure]
    @Param1 VarChar(200) = '',
    @Param2 VarChar(200) = ''
    AS ...
    both @Param1 and @Param2 have a default value of an empty string, and therefore should become empty strings if nothing (NULL values) gets passed in for them.
    But, like I said, what I'm finding is that with Crystal calling the stored procedure with NULL @Param1 and @Param2 values, they never become empty strings, but rather remain as NULLs.
    This was never a problem with SQL 2000.
    Very perplexing. Anyone else every experience this?
    Thank you.

    Please ignore my earlier post -- answered my own question.
    NULL parameter values do not get replaced by default values in SQL -- that is normal behavior in both SQL 2000 and SQL 2005. Just goes to show, that no many how many years programming experience you have, you can still get tripped up sometimes : (

  • SSRS Report date parameter values using SSAS Cube as datasource

    Hey Guys, 
    i m building an SSRS report using SSAS cube as the data source. The report contains shared data-sets which provide the required data. below is the set up.
    Sql server version : Sql server 2008R2
    Report builder 3.0 
    I have, Report A, powered by Dataset D, running on Cube C. The dataset has 3 parameters out of which one of them is a date parameter- P1. I have it set up such that on the report there is  another parameter - P2 which contains the type as Date ( to
    ensure the user is exposed to a date picker), the input from this, P2 is then manipulated to required format before fed into the dataset parameter P1 (hidden). I have two questions regarding this parameter.
    Currently, when the user pick's a date (P2) which has no values, the report errors out as it doesn't find that corresponding member on the cube. Can it be made such that if the member doesn't exists, a simple error message like "date not found"
    pops up as opposed to report failing?
    Secondly, can i manipulate the date picker (P2) exposed to the user such that the unavailable dates are grey'ed out on the date parameter (P2)? 
    Please let me know if there is any more info required on each of the questions.
    Thanks
    Srikanth

    Hello Katherine,
    below are the errors which pop up with the 'Constrained' function in place and without. The MDX query is what follows.
    Without: 
    An Error has occurred during report processing. (rsProcessingAborted). The Execution Failed for the shared data set “Dataset1”.(rsDataSetExecutionError). Query Execution failed for dataset ‘DataSet1’. (rsErrorExecutingCommand). The dimension ‘[10 Sep 2014]’
    was not found in the cube when the string, [10 Sep 2014], was parsed.
    With Constrained flag:
    An Error has occurred during report processing. (rsProcessingAborted). The Execution Failed for the shared data set “Dataset1”.(rsDataSetExecutionError). Query Execution failed for dataset ‘DataSet1’. (rsErrorExecutingCommand). Query(1,1476) The restrictions
    imposed by the CONSTRAINED flag in the STRTOSET function were violated.
    SELECT
    NON EMPTY
    [Measures].[A]
    ,[Measures].[B]
    ,[Measures].[C]
    ,[Measures].[D]
    ,[Measures].[E]
    } ON COLUMNS
    ,NON EMPTY
    [DimA].[LevelA].[LevelA].ALLMEMBERS*
    [DimB].[LevelB].[LevelB].ALLMEMBERS*
    [Date].[Date].[Date].ALLMEMBERS
    DIMENSION PROPERTIES
    MEMBER_CAPTION
    ,MEMBER_UNIQUE_NAME
    ON ROWS
    FROM
    SELECT
    StrToSet (@FilterA ,CONSTRAINED) ON COLUMNS
    FROM
    SELECT
    StrToSet(@Date, CONSTRAINED) ON COLUMNS
    FROM [Cube1]
    WHERE
    [DimC].[Level1].&[Member1]
    ,[DimC].[Level2].&[Member1]
    ,[DimC].[Level3].&[Member1]
    ,[DimC].[Level4].&[Member1]
    Thanks
    Srikanth

  • How to use Return parameter of BAPI in DOE

    Hello all,
    I have a question on Return parameter of BAPI wrappers written in backend. When we use the BAPI in DOE there i do not see any table which stores these Return parameters then what is the use of writting it in BAPI wrappers.
    Can anyone please clarify??
    Thanks & Best Regards,
    Abhishek

    Hi,
    BAPIRET are stored in log tables during delta download(You can check it in logs and traces of backend integration).
    In case of upload, the bapiret is returned in message error list to the devices. Its also stored in message error list table which you can see it in message monitoring.
    In upload scenario case all the BAPIRET returned by backend are captured ,where as in case of delta load or push the BAPIRET of type 'A' and 'E' are captured by default and other message types are captured when trace setting is higher.(SMMW_TRC_SETTING).
    Regards,
    Dhana

  • Parameter to Report

    I have a question about passing parameter from form to the
    report. I know how to use run_product to call a report but my
    question is when I pass a parameter in the run_product to the
    report like eg.
    Add_Parameter
    (pl_id,'count_number',TEXT_PARAMETER,'19');
    Run_Product(REPORTS, 'myreport',
    SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    the pl_id is the parameter which will be use in the report, but
    how do I accept this parameter from my report?
    I'll be appreciate on any help!
    Thanks in advbance
    Eric
    null

    Eric (guest) wrote:
    : I have a question about passing parameter from form to the
    : report. I know how to use run_product to call a report but my
    : question is when I pass a parameter in the run_product to the
    : report like eg.
    : Add_Parameter
    : (pl_id,'count_number',TEXT_PARAMETER,'19');
    : Run_Product(REPORTS, 'myreport',
    : SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    : the pl_id is the parameter which will be use in the report,
    but
    : how do I accept this parameter from my report?
    : I'll be appreciate on any help!
    : Thanks in advbance
    : Eric
    Dear Eric
    I want to clear some pints first.
    When you define a parameter in Forms, it should be assigned to
    parameter list. In the example the parameter is "count_number"
    and the paramter list id is "pl_id" for the list.
    You can alos pass parameter list also.
    Each forms module defaultly has one parameter list called as
    "default". When you define a parameter in Navigator, it will be
    assigned to this default parameter list.
    Now I will clear your doubt.
    To catch up the paramter you passed throuh the list, you define
    a parameter in Reports Navigator with the same parameter name.
    This is applicable for all parameters you pass.
    This paramters in Reports are called as User Parameters.
    You can refere this parameter in Reports by the sysntax
    PARAMETER.parametername
    Thanks and Regards
    Jeya Raman R
    null

  • UTL_FILE_DIR parameter in Oracle 10g

    Hi all,
    I've a question regarding UTL_FILE_DIR parameter being deprecated in 10g.
    My question, if anyone is doing File I/O based on UTL_FILE_DIR on 10g without problems?
    I did a small test on Windows which was successful, but I would still want to make sure there aren't any potential risks related to using this parameter on 10g.
    I would appreciate valuable feedback from you all.
    The reason for using this parameter instead of directory objects is to avoid changes in our huge code base during migration.
    Thanks in advance,
    ~Raj

    It isn't.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select name, value, isdeprecated
      2  from gv$parameter
      3  where name = 'utl_file_dir';
    NAME                           VALUE                          ISDEP
    utl_file_dir                                                  FALSE
    SQL> That said it is definitely not best practice to use it.
    Creating a DIRECTORY object is far more secure and far more maintainable.

  • How to set EXPORT parameter from message mapping

    Again, ask the question of export parameter.
    I wrote a java version transformation and it worked good with export parameter.
    However I can not work it out in graphical message mapping. I refered http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    In PI7.1, I add an export parameter "EXPORT_PARA" in the "Signature" tab. Are there any special step to assign this parameter to an UDF? I did not find a way to do it.
    And then I define an UDF,
    public String SetExportPara(String sss, Container container) throws StreamTransformationException{
    String str = "GOOD";
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    if(paras.exists("EXPORT_PARA ") == true) {
    paras.setString("EXPORT_PARA ", str);
    }else {
    str = "NOT FOUND EXPORT_PARA";
    return str;
    And I assign this UDF to one element of my output XML, I tried to run it in IE, it always output "NOT FOUND EXPORT_PARA.
    why?????
    I know there is a blog : https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8654. [original link is broken] [original link is broken] [original link is broken]
    But it did not talk how to set export parameters.

    Hi,
    i read thread
    How to export parameters from Message Mapping
    and blog
    /people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
    but not found issue
    in this topic
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    if i writting this code in UDF, i getting an error.
    If use this code:
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    paras.setString("EXPORT_PARA ", str);
    the export parameter is defined locally (in transformation step area). In integration process area parameter is equal to NULL.
    How send export parameter to Integration Process? For exapmple, i wanna send parameter to other transformation step in my integration process.
    thx.

Maybe you are looking for

  • Update Problem(No Errors Given)

    I get the gratuitous "restore your iphone" message and when I try the little wheel just keeps spinning and spinning and spinning and spinning. I downloaded the new update for the iPhone from iTunes tonight and it will not take. The first time I attem

  • Using iSight to stop display sleep

    Hi I want to use an old 20" iMac as a simple billboard behind a window, showing an iPhoto slideshow, without any user interactivity. That's the easy part. However, since there won't people to look at the screen all the time, and there may in fact be

  • Want to start learning Oracle or PL/SQL from scratch.

    Hello All, Please guide me as how to start learning PL/SQL and Oracle from scratch. Whether I should follow a particular book and go on as given in the book or should I directly take the queries and all and start solving them. Thanks in advance...

  • Since the last software update I can not access my ibooks which I purchased.  Why

    Where are my ibooks gone

  • I am going to SNAP!  Stupid Video!

    Hi there, yes yes. I realize I should search the forum.. I did that and there are about 10 different answers to my questions... and they are to do with Getting Video on my Ipod. I am not going to lie... I am ignorant when it comes to this stuff... I