range gaugedouble binding

Hello

I have a problem of definition of the range of a GaugeDouble with MVVM

Here is my Code that does not work. Let's hope anyboy can help me:

and in my Viewmodel

Private beach _GaugeRange;
Public GaugeRange
{
get {return _GaugeRange ;}
set
{
_GaugeRange = value;

NotifyPropertyChanged ("GaugeRange");
}
}

Thanks for your help

With your complete code, I was able to reproduce the problem. I don't know why the link is cleaned on a control inside a data model, rather than the behavior to the outside.

As a solution, I found that you can use a link on a custom attached property that assigns the range directly:

XAML

    ...

    my:Extensions.Range="{Binding GaugeRange}" />

    ...

Code

    public static class Extensions {

public static readonly DependencyProperty RangeProperty =

            DependencyProperty.RegisterAttached(

                "Range", typeof( Range ), typeof( Extensions ),

                new PropertyMetadata( OnRangeChanged ) );

public static Range GetRange( DependencyObject d ) {

            return (Range)d.GetValue( RangeProperty );

        }

public static void SetRange( DependencyObject d, Range value ) {

            d.SetValue( RangeProperty, value );

        }

private static void OnRangeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) {

            var pointer = (NumericPointer)d;

            pointer.Range = (Range)e.NewValue;

        }

}

Tags: NI Software

Similar Questions

  • Dynamic model AMX in ADF Mobile

    Hi guys,.

    As seen in file AMX to design the user interface for ADF Mobile, but I just need to have a dynamic flow user interface
    for example. When choosing fall down in the page (A) and jump to the next page (b) with the value control to show some of < amx:inputText > in the page (b)

    How to make dynamic in amx?

    Hello

    have a bean managed in the Workflow page range. Bind the property made of components on the page to the same successful bean and have the bean by assigning the value of the field that is rendered true or false. That's how I'd do. A similar use case is here: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/m02-dynamicallyshowhidecomponents-1915399.pdf

    Frank

  • Could not add the instance of a hidden subform

    I use Adobe Designer 10 and have used the Action feature to set up my buttons.

    Here's the problem:

    The user is presented with a question:

    You eat apples? Yes/No.

    If the user selects the 'Yes' box, then the subform, 'WhatKindofApples', is set to Visible and appears.

    If the user eat more than one kind of apple, the user must be able to add additional instances of 'WhatKindofApples' by clicking on the button 'add additional apples '.

    If the subform, 'WhatKindofApples', is set to Visible the button 'Add additional apples' works very well.

    If the subform is set to Hidden, then the Add button does not work.

    So, it seems that there is some kind of conflict between being able to add additional instances of subforms hidden once they become visible. I have included my form Javascript code.

    Here is the Javascript code for the Add button:

    Form1. WhatKindofApples.AddAddlApples::click - (JavaScript, client)

    + PRODUCT - CHANGE (ID:0482B39E - E8D0-4F08-B 313-E142D733EE1F CRC:2782582760)

    + Type: Action

    + Result1: AddInstance ("$Node2")

    + Node2: form1 [0]. WhatKindofApples [0]

    + Node1: form1 WhatKindofApples [0] [0]. AddAddlApples [0]

    + Condition1: Button ("$Node1", "click")

    + ActionName: AddlEntityPrivate.click

    this.resolveNode('form1._WhatKindofApples').addInstance (1);

    If (xfa.host.version < 8) {}

    XFA. Form.Recalculate (1);

    }

    //-

    Any help would be greatly appreciated!

    Hello

    I suspect that the addInstance() is trying to work. Keep in mind that the addInstance() will create a new instance of the object that is repeated in its original state. So if the extensible object has hidden, then if new instances are created they will be also hidden.

    A work around would be to establish the presence of the subform to visible in design mode (object > field palette). Then, in the object > range of binding the value the number Min 0. This means that when the form is rendered, the subform will not appear. Finally, the script in the click event of the button would add an instance, rather than make it visible.

    Hope that helps,

    Niall

  • tables spanning multiple pages

    Hello

    I have a table nested with in subforms sank three, when I dynamically add rows (using a numeric field, a "submit" button and a loop in javascript) I can add about 18 ranks without problem, howvewr if I try to add 25 lines, the form Insert 5 blank pages and place the table on the last page with 5 rows disappearing above the bottom. the table and the lines are set to split with content on the lines and the table and all subforms are split with content, but table refuses to divide?

    I can provide a sampe if necessary.

    any ideas?

    Keith

    Hi Keith,

    I don't know why you have wrapped the Table in subforms sank three. However check that each subform allows Page in the content breaks (object > subform palette). Also, make sure that the subforms are not to repeat, unless needed (object > range of binding).

    Hope that helps,

    Niall

  • Editing text in a table cell

    I have a set of option buttons three text list A B C text text in the row of the table, I have the default value defined in the text.  I also add a button to the table lines.  I can get the text to change in the first row to say text A text C etc but when I add a line of text does not change.  Is there a way to add lines and the text to line up with what has been chosen among the radio buttons? Hope this has meaning and any help on this is much appreciated. Thank you.

    Hello

    The problem is that when the new line is added, Acrobat adds a new instance of the default.

    If you want the cell to ALWAYS display the same data in all lines, the simpler approach it would be to establish the binding of this cell to Global (see object > range of binding).

    It should work,

    Niall

  • Quick help on a project of forms

    Hello.

    I have created a simple form page with text and the date of the entries, and I don't know how I can save the completed PDF form, it allows only save as PDF from the blank form.

    Can someone help out me with it?

    Thanks in advance.

    Good,

    Then, open the form in the designer of the CA and ensure that for each of the areas that the binding is set on name / Normal or if you need specific overall (see the object > range of binding). If the binding is set to None, then this may be the problem.

    Also, while in the Designer control that Script changes preserve is set to auto (see file > form properties > default values tab).

    You will then need reader allowing the form again.

    Niall

  • FormCalc/Script of the query?

    Start time
    End time
    Mode of Transport
    Travel time
    HH: MMHH: MMDrop-down listAuto calculated on the start/end times

    Total travel time
    Sum of the travel times

    Mode of Transport
    Journey time to total time
    Drop-down list

    I created an interactive form, which requires that members of the public to fill out a travel diary. I had all the calculations to work except the bottom table. I am trying to understand what formcalc scripts use to give a total of each mode of transport, based on the users choice. For example, if you want the user to see how many minutes they have cycled this week, they choose the bike in the drop-down list on the bottom table and then in time of course total he tells them how many minutes they have cycled this week here.

    Hello

    I'm all for learning and hope that this value returned form help. But a little annoyed that managers are not 'seems' to be place a value on this topic.

    https://Acrobat.com/#d=HJIBeWz3ZjvcBZjsSW-VRW

    I fixed the first two pages, how I think that it would be preferable to address the problem:

    1. I deleted the lines and just kept a line that is repeatable (see object > range of binding). It is easier to maintain, because the script is a line. The line is then defined to have a minimum of 10 occurrences.
    2. I have also included tips in the areas of accessibility. All authorities.
    3. You must name the objects based on their role. This makes it much easier to script. See here: http://assure.ly/mxZO9T.
    4. I have inserted a page and a table for the summary. I took an approach where all categories would be visible and the corresponding times. I also includes a bar chart. You could color each bar based on the green of the mode of transport.
    5. You will need to look at the script in the summary times. It runs through the first two pages AND loops through each of the 10 rows in each of these tables.

    Loop script for anyone interested:

    // Set up some variables
    var vTime = 0;
    var currentRow;
    // Calculate a summary for car
    for (var i=3; i<5; i++) // work through the first two pages
    {
         for (var j=0; j<10; j++) // work through the ten rows in each page
         {
              currentRow = xfa.resolveNode("Page" + i + ".Table1.Row1[" + j + "]"); 
    
              if (currentRow.modeTransport.rawValue == "Car")
              {
                   vTime = vTime + currentRow.journeyTime.rawValue;
              }
         }
    }
    // Set summary journey time
    this.rawValue = vTime / 60;
    

    I hope that your manager will see value!

    Niall

  • Autopopulate a text field in a table in table

    I don't know if it's possible, but I'll tell you what I would do: -.

    I have a table which allows the user to add a name, they also have the ability to add additional names to the table. What I then do is auto fill out another table with these details.

    Any help would be appreciated.

    Hello

    If you had textfield objects that were outside of a table, then you would have the same name for both objects and use global binding (see the object > range of binding).

    This actually gives you a two-way binding. All that a user types in a field, automatically appear in the other.

    However, this may not work with textfields in tables, or certainly not in dynamic tables where the user can add rows. This is because the value in an object in a single line will be repeated in all THE lines.

    So if you have a static table where the user can add rows, then you can set the lines and objects with different names. The associated static table would have the same naming structure. Then global link might work.

    If the table is dynamic, I have a script example here, where there is a loop on the event to exist that crosses the table and replicates the data in the related table. See here: http://assure.ly/eTOXaH.

    Hope that helps,

    Niall

  • Estimates of cardinality for index range scan with bind variables

    Oracle 11.2.0.4

    I am struggling to explain that the cardinality estimates for a scan of the index systematic range when using the bind variable.

    Consider the following query:

    SELECT /*+ INDEX(t1) */ *
    FROM   t1
    WHERE  source_id <= ?;
    
    

    Cardinalities for the INDEX RANGE SCAN and ACCESS of the TABLE are the same for different literal predicates, for example, source_id < = 5:

    ------------------------------------------------------------------------------------
    | Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |      |    50 |   350 |    12   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1   |    50 |   350 |    12   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IX1  |    50 |       |     2   (0)| 00:00:01 |
    ------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("SOURCE_ID"<=5)
    
    

    If a variable binding is used instead of a literal, the overall selectivity is 5%. However, why the optimizer based on CSSTidy gives a cardinality estimated 11 for the scan of the index systematic range? As with the predicates literal, surely the cardinalities of the index range scan and access table should be the same?

    ------------------------------------------------------------------------------------
    | Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |      |    50 |   350 |     5   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T1   |    50 |   350 |     5   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | IX1  |    11 |       |     2   (0)| 00:00:01 |
    ------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("SOURCE_ID"<=TO_NUMBER(:A))
    
    

    Unit test code:

    CREATE TABLE t1
    ( id NUMBER
    , source_id NUMBER
    );
    
    CREATE INDEX ix1 ON t1 (source_id);
    
    INSERT INTO t1
    SELECT level
         , ora_hash(level,99)+1
    FROM   dual
    CONNECT BY level <= 1000;
    
    exec DBMS_STATS.GATHER_TABLE_STATS(user,'T1')
    
    EXPLAIN PLAN FOR
    SELECT /*+ INDEX(t1) */ *
    FROM   t1
    WHERE  source_id <= 5;
    SELECT * FROM TABLE(dbms_xplan.display);
    
    EXPLAIN PLAN FOR
    SELECT /*+ INDEX(t1) */ *
    FROM   t1
    WHERE  source_id <= :a;
    SELECT * FROM TABLE(dbms_xplan.display);
    
    

    There are various places where the optimizer uses an assumption, and lie unpeekable (and of Villa "unknowable value") introduced guess.

    For unpeekable binds the conjecture for column<= {unknown}="" is="" 5%="" for="" table="" access="" (hence="" 50="" rows="" out="" of="" 1,000),="" but="" it's="" 0.009="" for="" index_column=""><= {unknown},="" which="" means="" i="" was="" expecting="" to="" see="" 9="" as="" the="" row="" estimate="" on="" the="" index="" range="">

    I just ran some quick tests, and EXPLAIN the PLAN seems to just use 0.011 selectivity in this case (in different versions of Oracle) although if we do the bind variable unpeekable at run time (and sample dynamic block etc.) optimization for execution is 0.009%.

    Concerning

    Jonathan Lewis

    Update: and this is a very old reference to the 0.009 (and 0.0045 for ' between the ' when it is applied to a clue: cost based Oracle - access Chapter 4 single B-tree )

  • Bind the time range slider to input fields

    I went through a bunch of tutorials and can't seem to find the answer to this. I'm trying to implement a cursor of the chronological range for entry into a database. I started with the example

    http://codepen.io/caseymhunt/pen/kertA.

    I have two input fields IDs StartTimeEntry and EndTimeEntry . How can I get the values of the scabbard for updating the values of these two fields of entry form?

    Thank you.

    Locate the following line in the script jQuery on CodePen:

    $('.slider-time').html (hours1 + ':' + minutes1);

    Replace it with this:

    $('#startTimeEntry').val (hours1 + ';' + minutes1);

    Similarly, replace this:

    $('.slider-time2').html (hours2 + ':' + minutes2);

    with this:

    $('#endTimeEntry').val (hours2 + ':' + minutes2);

  • Airport most convenient that the range extender today broke up after that put 7.6.7 at level

    I have two extreme airport connected with an ethernet cable, one for upstairs and one for down. One downstairs is set to extend the reach of the network wireless created by one on the floor. Also the one upstairs is configured in Bridge mode because I have a server that I use for DHCP and DNS, instead of using the airport for that. The server and the airport on the floor are connected to the same network switch.

    Everything worked very well under firmware 7.6.4. But after the upgrade to 7.6.7 and without changing any settings, now my network is terribly broken. No devices can connect to the wifi network, and the network interface on the server shows errors like "has received the package on eth1 with own address as source address" and "Null supervisors, receiver of broadcasting not ready."

    The problems went away by unplugging the airport down.  But this isn't a good solution.  I want to have both, and I want that they function as they did before.

    When you have airports connected by ethernet... YOU MAY NOT USE EXTEND WIRELESS.

    The result is the following.

    Server shows errors like "has received the package on eth1 with own address as source address" and "Null supervisors, receiver of broadcasting not ready."

    You create a loop where packets are going around and around the system.

    If you say you had it past 7.6.4 firmware and it was broken by 7.6.7 well, I can only say that he has never worked on any firmware with a switch or other device which is able to break loops.

    Return to 7.6.4 and see if it still works.

    I found that Wireless extend over 7.6.7 is more restrictive than the firmware as soon... I highly recommend 7.6.1 for it... as I can show 7.6.4 reproducible problems but it is also a case that former airports are losing just their WILL... I had success extend wireless who recently failed... and it's purely too big range... considering that it used to work properly. Which shows that the products are just slow decline.

    I also get numbers of the absurdity of airport utility that I still don't understand.

    for example. I got the link to work on a new Gen5 TC (refuses to bind on Gen4 TC)

    If I click on the unknown link, it shows a link 450Mbps speed which is impossible. The RSSI is also what you would get with the two devices within 1 foot of the other (30 cm) No 20 M through several walls and a floor.

    The end of TCgen5 by using the utility v5.6, I see the actual rate...

    The link is showing 54 Mbit/s and a signal-78dB which makes much more sense. Unfortunately the other end does not record again... and the value 0 for the noise is also wrong.

    Noise on the latest diagnostics wireless displays 0 for a lot of wireless.

    Something rotten in the world of the Apple to the end... What with the CCMM giving a total mess to Airport utility if people use it...

  • My bt hub holds the kickoff me she even thought its still in the range and seems active?

    bt home hub 2.0

    his dissconnecting myself and all other users even though its range in good and seems active also entered the password and it binds us to a short whil (sometimes connection lasts only five minutes or may last for a day vary rarely however) after phoning bt at least four times to ask for help was the best help offered to me download the witch help desk at wide band BT was no help at all as he could not do a thing and told me on the phone bt still!. This is a stupid problem, and we do not pay our internet Bill for the constant excersise to restart the hub at least four or five times a day! We pay to actually use it! apologies for the mug shot, but it went past long enough and if I caant seek help here soon I'll change over the Virgin or a different provider. Please please help me lol

    Hello

    What operating system do you work?

    You can try the following methods and check the status of the issue.

    Method 1:

    Wi - Fi and in Windows network connection issues.

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    Method 2:

    Configure the computer to clean start State to check software conflicts.

    http://support.Microsoft.com/kb/929135

    Note: When the diagnosis is complete, don't forget to reset your computer to normal startup. Follow step 7 of the above article.

  • Computer "is" more low-signal router instead of range extender

    I've seen a few similar posts; but nothing seems exactly like my problem; or I missed it.

    I have a router WRT54G and WRE54G range extender; seem to be working well and talk to each other.  (Took a while, but I got it; and it has been fine since.)   I connected to the signal stronger WRE fast when Internet and slow Internet when WRT connected to the lower signal (which is further) - just like one would expect.

    The problem: my computer (only place Office) will be unrelated to the stronger signal "Range Extender".  I'll work some time or leave and come back - and the link will be back signal Extender, fast router signal slow, lower.  I can click on my profile; Connect and sometimes come back on the most powerful signal.  (If not, try again and again until it crashes into the most powerful signal.)  [Even with "site survey" - I select Connect to the stronger signal, but it seems to connect randomly either.]

    - & - Another post, I think I could do something with the MAC addresses - for example, block my USB MAC of the router wireless receiver, so he 'only' to connect to the Extender.  (Better yet, I can say my network connection to connect only to the MAC of the extender?)

    Operating system is - 2000

    Here's something I put in place earlier - for the most part just repeats above:

    Equipment:

    LinkSys wireless router; WRT54G; 6 worm.  Firmware 1.00.7 (now 1.02.7)

    LinkSys Range Extenders;  WRE54G; Firmware Ver 3 3.01.01 (now 3.04.01.)

    USB LinkSys network adapter: WUSB54G Ver 4

    -WHY it keep coming back to the lowest signal from router?  (The big question).

    -Why, when I do a site survey, select the strongest signal and select Connect, enter the WEP code, he still occasionally connect back right at the lowest signal from router, even if I've highlighted the stronger signal Repeater when I hit the Connect button?

    -If I create profiles with the most powerful signal, it is always the same (that is, sometimes it connects the signal the most powerful signal "Extender" and sometimes the Repeater weaker signal, except that I do not need to enter the WEP code if I connect to the profile instead of the signal of view survey.)

    -According to information online, I found that the router must be on 'Firmware version 2.02.2' to be compatible WRE;   But - if I check for the latest version of the firmware for WRT54G version 6, it is 1.02.7 - does that mean the Extender is incompatible with my router?

    -Are there a way to "force" the wireless network connection to bind to a specific MAC address - so I can restrict to a stronger signal of the Extender?

    Scrooge, thanks for the suggestions.    Earlier, I tried the following solution, based on a similar condition a few - this on another post:

    Solution: Configure the router MAC filtering does not to allow connections to the MAC address of the wireless USB network card.

    Since I tried this a few days ago I was followed and it worked.  So, before he would keep switching to the smaller Repeater link.  In saying the Repeater from the heat to let the link not only the Extender to post a link and it is now to stay connected to the Extender and the speed remains constant.

  • Estimate of poor cardinality using Bind Variables

    Hi I'm using the 11.2.0.4.0 Oracle version. I have a query that is underway for the plan of the poor execution by the estimate of poor cardinality for two tables (I've extracted and published this part only) as I mentioned below, the individual conditions for which the estimate goes bad and moving entire query execution path.

    These are for two tables and currently we use BIND variable for them in our code, and I notice, its best estimate gives with literals. I need to know how to handle this scenario that I need this query to execute for all types of volumes. Is there something I can do without changing the code, as it works well for most of the execution? In the current scenario of the main query that uses those below tables providing a plan (index + nested loop) that works very well for small volume, but running for 10 hr + for large volume as ideally its going to the same regime.
    And Yes, most time that this request will be hit for small volume, but killing some appearance of large volume presents the performance of the queries.


    Here are the values of the variable binding.

    B1 VARIABLE VARCHAR2 (32);
    B2 VARIABLE VARCHAR2 (32);
    B3 VARIABLE NUMBER;
    B4 VARIABLE VARCHAR2 (32);
    B7 VARIABLE VARCHAR2 (32);
    B5 VARIABLE NUMBER;
    B6 VARIABLE NUMBER;

    EXEC: B1: = 'NONE ';
    EXEC: B2: = NULL;
    EXEC: B3: = 0;
    EXEC: B4: = NULL;
    EXEC: B7: = NULL;
    EXEC: B5: = 0;
    EXEC: B6: = 0;

    ---- For  TABLE1-------
     -- Published Actual VS Etimated cardinality
     
     
    -- With bind values
    select * from TABLE1 SF
    WHERE (   (SF.C1_IDCODE = :B4) OR (NVL (:B4, 'NONE') = 'NONE'))
        AND ( (SF.C2_ID = :B3) OR (NVL (:B3, 0) = 0));
    Plan hash value: 2590266031
    -----------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                 | Name                | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    -----------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT          |                     |      1 |        |  28835 |00:00:00.08 |    2748 |     46 |       |       |          |
    |*  1 |  TABLE ACCESS STORAGE FULL| TABLE1              |      1 |     11 |  28835 |00:00:00.08 |    2748 |     46 |  1025K|  1025K|          |
    -----------------------------------------------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - storage((("SF"."C1_IDCODE"=:B4 OR NVL(:B4,'NONE')='NONE') AND ("SF"."C2_ID"=:B3 OR NVL(:B3,0)=0)))
           filter((("SF"."C1_IDCODE"=:B4 OR NVL(:B4,'NONE')='NONE') AND ("SF"."C2_ID"=:B3 OR NVL(:B3,0)=0))) 
     
    -- With literals 
    select * from TABLE1 SF
     WHERE  (   (SF.C1_IDCODE = null) OR (NVL (null, 'NONE') = 'NONE'))
          AND ( (SF.C2_ID = 0) OR (NVL (0, 0) = 0));
       Plan hash value: 2590266031
    --------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                 | Name                | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    --------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT          |                     |      1 |        |  28835 |00:00:00.03 |    2748 |       |       |          |
    |   1 |  TABLE ACCESS STORAGE FULL| TABLE1              |      1 |  28835 |  28835 |00:00:00.03 |    2748 |  1025K|  1025K|          |
    --------------------------------------------------------------------------------------------------------------------------------------
    
    --------For TABLE2 ----------------------- 
    -- Published Autotrace plan, as it was taking long time for completion, and actual cardinality is 45M, but its estimating 49 With bind value---
    
    --withbind value
    select * from TABLE2 MTF
    WHERE (   (MTF.C6_CODE = TRIM (:B2)) OR (NVL (:B2, 'NONE') = 'NONE'))
      AND (   (MTF.C3_CODE = :B1)  OR (NVL (:B1, 'NONE') = 'NONE'))
      AND (   (MTF.C4_CODE = :B7)  OR (:B7 IS NULL))
      AND (   (MTF.C5_AMT <= :B6)  OR (NVL (:B6, 0) = 0))
      AND (   (MTF.C5_AMT >= :B5)  OR (NVL (:B5, 0) = 0));
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1536592532
    -----------------------------------------------------------------------------------------------------------
    | Id  | Operation                  | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    -----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT           |              |    49 | 10437 |   358K  (1)| 01:11:43 |       |    |
    |   1 |  PARTITION RANGE ALL       |              |    49 | 10437 |   358K  (1)| 01:11:43 |     1 |  2 |
    |*  2 |   TABLE ACCESS STORAGE FULL| TABLE2       |    49 | 10437 |   358K  (1)| 01:11:43 |     1 |  2 |
    -----------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - storage(("MTF"."C4_CODE"=:B7 OR :B7 IS NULL) AND ("MTF"."C3_CODE"=:B1 OR
                  NVL(:B1,'NONE')='NONE') AND ("MTF"."C5_AMT"<=TO_NUMBER(:B6) OR NVL(:B6,0)=0) AND
                  ("MTF"."C5_AMT">=TO_NUMBER(:B5) OR NVL(:B5,0)=0) AND ("MTF"."C6_CODE"=TRIM(:B2) OR
                  NVL(:B2,'NONE')='NONE'))
           filter(("MTF"."C4_CODE"=:B7 OR :B7 IS NULL) AND ("MTF"."C3_CODE"=:B1 OR
                  NVL(:B1,'NONE')='NONE') AND ("MTF"."C5_AMT"<=TO_NUMBER(:B6) OR NVL(:B6,0)=0) AND
                  ("MTF"."C5_AMT">=TO_NUMBER(:B5) OR NVL(:B5,0)=0) AND ("MTF"."C6_CODE"=TRIM(:B2) OR
                  NVL(:B2,'NONE')='NONE'))
      
    -- with literal
    select * from TABLE2 MTF
    WHERE (   (MTF.C6_CODE = TRIM (null)) OR (NVL (null, 'NONE') = 'NONE'))
     AND (   (MTF.C3_CODE = 'NONE') OR (NVL ('NONE', 'NONE') = 'NONE'))
      AND (   (MTF.C4_CODE = null)  OR (null IS NULL))
       AND (   (MTF.C5_AMT <= 0)  OR (NVL (0, 0) = 0))
      AND (   (MTF.C5_AMT >= 0)  OR (NVL (0, 0) = 0));
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1536592532
    -----------------------------------------------------------------------------------------------------------
    | Id  | Operation                  | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    -----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT           |              |    45M|  9151M|   358K  (1)| 01:11:41 |       |    |
    |   1 |  PARTITION RANGE ALL       |              |    45M|  9151M|   358K  (1)| 01:11:41 |     1 |  2 |
    |   2 |   TABLE ACCESS STORAGE FULL| TABLE2 |    45M|  9151M|   358K  (1)| 01:11:41 |     1 |  2 |
    -----------------------------------------------------------------------------------------------------------
    
    select column_name,num_nulls,num_distinct,density
    from dba_tab_col_statistics where table_name='TABLE2'
    and column_name in ('C3_CODE','C4_CODE','C5_AMT','C6_CODE');
    C3_CODE 0 65 0.0153846153846154
    C4_CODE 0 2 0.5
    C5_AMT 0 21544 4.64166357222429E-5
    C6_CODE 1889955 71 0.0140845070422535
    
    

    933257 wrote:

    ((SF. C1_IDCODE =: B4) OR (NVL (: B4, 'NONE') = 'NONE'))

    In fact for literals, I did not find any section of the predicate after running the sql code with activation "set autotrace traceonly explain."

    The main problem is with another large query whose cardinality is underestimated due to the presence of these table (table1, table2) with the above mentioned clause, and the query is for the analysis of index + nested with values of Bind loops and take 10 hr +, whereas with literals, its completion in ~ 8minutes with FTS + Hash Join.

    Your real problem is that you try to have just a single SQL query handle all POSSIBLE thanks to the use of embedded FILTERS ' either / or ' filters in the WHERE clause.  You want only a select this OPTION to run whatever filters have been selected at run time by the user or the application using it.  And it would never work.  You really need to SELECT different queries for different combinations of filter conditions.

    Why?  Think for a minute.  How Oracle works internally?  A SQL SELECT query gets analyzed and an execution plan is produced which is stored in the library cache and gets REUSED on all subsequent executions of this query - except in certain cases where there may exist several plans run through several cursors of the child.  So with only SELECT a query you only AN execution plan in the library cache, to be used by all THE executions of this query, regardless of the value of your run-time binding variables.

    Lets put another way - each library cache execution plan is associated with a SQL statement.  If you want a DIFFERENT execution plan then you need run a DIFFERENT SQL statement.  That's how you get a different execution plan - by running a different SQL statement.  Running the SAME SQL query generally you will get the SAME execution plan every time.

    In addition, because of the "either / or" filters that you use you will end up generally with a full Table Scan on each of the referenced tables.  Why?  Given that the optimizer must produce an implementation plan that manages all possible contingencies for all values of possible bind variables in the SELECT.  If the optimizer should choose to use any index based on one of these "either / or" filters then it would only help performance when real value was provided, but it would be really bad if a NULL value was supplied.  If the optimizer ends up ignoring the index because they are not always optimal for all possible input values and instead chose a plan that is "good enough" for all input values possible.  That means that it will use a scanning Table full.

    I hope you can see that it is precisely what is happening for you with your query.  You select this OPTION to manage the different combinations of filter, which leads to the execution plan only one, which leads to scans full Table on the referenced tables in these ' either / or ' filters.

    The solution?  Build queries SELECT DIFFERENT when input values are NULL.  How you do that?  Read this article to ask Tom that tells you:

    http://www.Oracle.com/technetwork/issue-archive/2009/09-Jul/o49asktom-090487.html

    To sum up - when you have real value for a bind variable 'bind_var1' add the following filter to your CHOICE:

    AND column_name1 =: bind_var1

    When the binding variable is NULL, add the filter according to your CHOICE:

    AND (1 = 1 OR: bind_var1 IS NULL)

    Now, you'll have 2 queries SELECT must be performed, which have exactly the same number of variables in the same order bind, which is important.  When you then run one of these variations, Oracle can analyze and optimize each one SEPARATELY, with a single execution by the SELECT query plan.

    When you provide a real value, the filter is a normal 'column = value' that the optimizer can use all indexes on this column, because NULL values are not referenced.

    When there is no real value, the optimizer will analyze the '1 = 1 GOLD' and realize that "1 = 1" is set to TRUE and GOLD, it is quite TRUE regardless because the binding variable is null or not.  This means that the optimizer will actually REMOVE this filter, because it filters nothing because it is always TRUE.  You will end up with an operating plan based on the other filters in the query, which is what you want because you have no filter on this column.

    What is it - producing distinct SELECT queries to determine if you have a real value to filter or not you end up with DIFFERENT execution plans for each of them, and each of them is OPTIMAL for this particular set of filters.  Now you get good performance for each variation of the performance of the SELECTION, rather than sometimes good and sometimes very bad when using SELECT only one.  It is impossible to try to get multiple shots of execution 'optimal' out of a SELECT query.  That's why you get mediocre performance under different bound the values of the variables.

    John Brady

  • ViewObject range Paging performance problem

    Hi all

    I am facing a performance problem with the implementation of an obligation to programmatically add a number of extra where the parameters of the clause (using bind) variable in combination with range paging.

    My code looks like this

    ...
    
    ApplicationModule am = Configuration.createRootApplicationModule("services.DossierAM", "DossierAMLocal");
    ViewObject vo = am.findViewObject("DossierListView");
    
    // apply programmatic view criteria
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute("Reference", "15/%");
    vc.addElement(vcr);
    vo.applyViewCriteria(vc, true);
    
    
    // enable range paging
    vo.setAccessMode(RowSet.RANGE_PAGING);
    vo.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_PARTIAL);
    vo.setRangeSize(50);
    vo.scrollToRangePage(5); // Cause a java.sql.SQLException: Parameter IN or OUT missing for index.....debugging learned that the :vc_temp_1 bind variable is not filled
    // vo.scrollToRange(250); // Cause a java.sql.SQLException: Parameter IN or OUT missing for index.....debugging learned that the :vc_temp_1 bind variable is not filled
    
    ... 
      ...
    

    I found 2 solutions, but they both require an application of additional database that is, performance wise, is not acceptable.

    The first solution is to slip into an additional call to exectueQuery() before the call to function scrollToRangePage (int) or scrollToRange (int).

    The second solution is to use the method (int) setRangeStart instead of variants scrollToRange (Page). This method performs also 2 database calls.

    My question to you:

    Is there another way to satisfy the requirement of programming add a certain number of parameters of the additional where clause (using the variable binding) in combination with the pagination of the range without the need to perform queries of database 2?

    The code is tested with JDeveloper, 11.1.2.4.0, and 12.1.3.0.0 and behaves the same on both versions.

    Kind regards

    Steven.

    Have you tried to create truly VC with bind variable (rather than use binding implied var created by frame)?

    Something like: http://www.jobinesh.com/2010/10/creating-view-criteria-having-bind.html

    Dario

Maybe you are looking for

  • iTunes sync problem

    I can't synchronize both of my iphones 5 & 6 in iTunes. The synchronization options are grayed out. I have ITunes and IOS updates. I allowed the phones on my PC. My device driver is up-to-date. What should I try? Thank you /

  • I need to unsubscribe from Apple Support communities.

    I need to unsubscribe from Apple Support communities. How to do that. Thank you < re-titled by host >

  • Satellite A - new battery not detected

    Changed battery from PA3534U-1BRS 4000mAh to PA3534U-1BRS 4400mAh. What new battery installed message "no battery detected.I tried to turn off the machine etc. and remove, then reinstall the new battery, but it makes no difference. Any advice?

  • Using DAQ Assistant with a system remotely

    I'm new to LabVIEW and National Instruments hardware and I am trying to use an instrument with LabVIEW using the DAQ Assistant. I use a PC with Windows Vista and I am connected via a network to a PXI-8108 controller in a PXI-1050 chasiss chassis. The

  • What is CA_AllocMemory() followed in Resource Tracking?

    I have been using the option followed resource to track down memory leaks. But I recently noticed two or three memory using CA_AllocMemory() allocations that were never released. It didn't appear in the follow-up of the resources well. Then I was won