The index used is not in the group by.

Here's the scenario with examples. The big table 333 to 500 million in the table rows. Statistics are collected. Are there histograms. Index is not however be used. Why?
  CREATE TABLE "XXFOCUS"."some_huge_data_table" 
   (  "ORG_ID" NUMBER NOT NULL ENABLE, 
  "PARTNERID" VARCHAR2(30) NOT NULL ENABLE, 
  "EDI_END_DATE" DATE NOT NULL ENABLE, 
  "CUSTOMER_ITEM_NUMBER" VARCHAR2(50) NOT NULL ENABLE, 
  "STORE_NUMBER" VARCHAR2(10) NOT NULL ENABLE, 
  "EDI_START_DATE" DATE, 
  "QTY_SOLD_UNIT" NUMBER(7,0), 
  "QTY_ON_ORDER_UNIT" NUMBER(7,0), 
  "QTY_ON_ORDER_AMT" NUMBER(10,2), 
  "QTY_ON_HAND_AMT" NUMBER(10,2), 
  "QTY_ON_HAND_UNIT" NUMBER(7,0), 
  "QTY_SOLD_AMT" NUMBER(10,2), 
  "QTY_RECEIVED_UNIT" NUMBER(7,0), 
  "QTY_RECEIVED_AMT" NUMBER(10,2), 
  "QTY_REQUISITION_RDC_UNIT" NUMBER(7,0), 
     "QTY_REQUISITION_RDC_AMT" NUMBER(10,2), 
     "QTY_REQUISITION_RCVD_UNIT" NUMBER(7,0), 
     "QTY_REQUISITION_RCVD_AMT" NUMBER(10,2), 
     "INSERTED_DATE" DATE, 
     "UPDATED_DATE" DATE, 
     "CUSTOMER_WEEK" NUMBER, 
     "CUSTOMER_MONTH" NUMBER, 
     "CUSTOMER_QUARTER" NUMBER, 
     "CUSTOMER_YEAR" NUMBER, 
     "CUSTOMER_ID" NUMBER, 
     "MONTH_NAME" VARCHAR2(3), 
     "ORG_WEEK" NUMBER, 
     "ORG_MONTH" NUMBER, 
     "ORG_QUARTER" NUMBER, 
     "ORG_YEAR" NUMBER, 
     "SITE_ID" NUMBER, 
     "ITEM_ID" NUMBER, 
     "ITEM_COST" NUMBER, 
     "UNIT_PRICE" NUMBER, 
      CONSTRAINT "some_huge_data_table_PK" PRIMARY KEY ("ORG_ID", "PARTNERID", "EDI_END_DATE", "CUSTOMER_ITEM_NUMBER", "STORE_NUMBER")
  USING INDEX TABLESPACE "xxxxx"  ENABLE, 
      CONSTRAINT "some_huge_data_table_CK_START_DATE" CHECK (edi_end_date - edi_start_date = 6) ENABLE
   );

SQL*Plus: Release 11.2.0.2.0 Production on Fri Sep 14 12:11:16 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> SELECT num_rows FROM user_tables s WHERE s.table_name = 'some_huge_data_table';

  NUM_ROWS                                                                      
----------                                                                      
 333338434                                                                      

SQL> SELECT MAX(edi_end_date)
  2    FROM some_huge_data_table p
  3   WHERE p.org_id = some_number
  4     AND p.partnerid = 'some_string';

MAX(EDI_E                                                                       
---------                                                                       
13-MAY-12                                                                       

Elapsed: 00:00:00.00


SQL> explain plan for
  2  SELECT MAX(edi_end_date)
  3    FROM some_huge_data_table p
  4   WHERE p.org_id = some_number
  5     AND p.partnerid = 'some_string';

Explained.

SQL> /

PLAN_TABLE_OUTPUT                                                                                   
----------------------------------------------------------------------------------------------------
Plan hash value: 2104157595                                                                         
                                                                                                    
--------------------------------------------------------------------------------------------        
| Id  | Operation                    | Name        | Rows  | Bytes | Cost (%CPU)| Time     |        
--------------------------------------------------------------------------------------------        
|   0 | SELECT STATEMENT             |             |     1 |    22 |     4   (0)| 00:00:01 |        
|   1 |  SORT AGGREGATE              |             |     1 |    22 |            |          |        
|   2 |   FIRST ROW                  |             |     1 |    22 |     4   (0)| 00:00:01 |        
|*  3 |    INDEX RANGE SCAN (MIN/MAX)| some_huge_data_table_PK |     1 |    22 |     4   (0)| 00:00:01 |        
--------------------------------------------------------------------------------------------        

SQL> explain plan for
  2  SELECT MAX(edi_end_date),
  3         org_id,
  4         partnerid
  5    FROM some_huge_data_table
  6   GROUP BY org_id,
  7            partnerid;

Explained.

PLAN_TABLE_OUTPUT                                                                                   
----------------------------------------------------------------------------------------------------
Plan hash value: 3950336305                                                                         
                                                                                                    
-------------------------------------------------------------------------------                     
| Id  | Operation          | Name     | Rows  | Bytes | Cost (%CPU)| Time     |                     
-------------------------------------------------------------------------------                     
|   0 | SELECT STATEMENT   |          |     2 |    44 |  1605K  (1)| 05:21:03 |                     
|   1 |  HASH GROUP BY     |          |     2 |    44 |  1605K  (1)| 05:21:03 |                     
|   2 |   TABLE ACCESS FULL| some_huge_data_table |   333M|  6993M|  1592K  (1)| 05:18:33 |                     
-------------------------------------------------------------------------------                     
Why is he would not use the index in the group by? If I write a loop to search for different partnerid (there are only three), things together takes less than a second. Any help is appreciated.

BTW, I too gave the index indicator. Did not work. Version mentioned in the example.

Published by: RPuttagunta on September 14, 2012 11:24

Published by: RPuttagunta on September 14, 2012 11:26

the actual names are 'cleaned' for obvious reasons. Don't worry, I don't have the name of the tables in different cases.

RPuttagunta wrote:

Looks like either I called index_ss asked Jonathan a bad indicator, or, I don't know if he used the 'skip scan ".

You don't specify correctly, it should be: index_ss (table_alias) or index_ss (table_alias index_name) or index_ss (table_alias (list of columns to index)).

But I just tried a quick test on 11.2.0.3, and he does not have what we would really like to do.

Concerning
Jonathan Lewis

Tags: Database

Similar Questions

  • Index for the Group of readonly cache table

    Hello

    Suppose I have a table in Oracle which is cached in TT as a readonly cache group.
    The oracle table has a primary key, based on columns (c1, c2, c3).

    Now, the oracle table also has a unique index (for example defined on columns c4, c5) in support of some queries.

    (1) is there a way to propagate this unique index for the cache group? (so that we can perform queries effectively TimesTen)

    (2) is it correct to assume that the group create cache statement MUST have the columns (c1, c2, c3) for the primary key? (that is, exactly the same as the pharmacokinetics of the oracle)


    Thank you!

    (1) after you have created the cache in TimesTen group, simply create the index needed on the tables of cache in TimesTen (using CREATE [UNIQUE] INDEX) as you would for any table.

    (2), it depends. A caching table must have a primary key defined in TimesTen. This PK must map to either a real PK defined in Oracle (same column names, order of the columns, data types, nullability, etc..) or a unique index defined on a set of columns not null (column names of the soul, order of the columns, types of data etc.).

    Chris

  • I don't see any icon to access the groups next to my tabs, as indicated in the help. I have to use shortcut keys.

    I use Windows XP SP3. He indicates that in help for Firefox 5 icons on the screen to click like the one to the far right of the tab to access the groups bar. I've never seen these so don't know if they charge for my setup or if I just need to turn them on somewhere (can't find anything in the menus there).

    Firefox 4 and 5 seems different for some operating systems?

    The icon tab groups is in the Palette to customize.

    https://support.Mozilla.com/en-us/KB/how+to+customize+the+toolbar

    http://KB.mozillazine.org/Toolbar_customization

    Yes, Firefox 4/5 is a bit different on Windows XP that orange Firefox on Vista and Win7, the button is not displayed and the MenuBar on installations of Windows XP. Simply right click on the bar of Manu and turn off Bar Menu item on the shortcut menu.

    There are also slight variations on the Mac and Linux versions, too.

  • Watch does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets eg elliptical etc. is appropriate. Also does not count calories for example 35 when the rest of the group is around 500

    Look does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets etc for example elliptical is appropriate and therefore do not count toward the daily goal. Also does not count calories for example 35 when the average of the others in the group is around 500.

    Hello

    When you use the application of the training session, choose the type of activity that best fits your business. For anything else - like weight - select the other category.

    During the follow-up of one year to the next helps:

    • Activity app will credit the ring of progress of exercise with one minute for every minute of the workout.
    • Active calories will be based on the data recorded by the heart rate sensor or a brisk walk, whichever is greater.

    Note, however, that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (for example running) rather than the irregular movements.

    More information:

    Use of the workout on your Apple Watch - Apple Support

  • A way to group controls and indicators on the Front Panel and that they can be made Visible or not as a group?

    I would like to combine several orders and LEDs on the front panel in a group in a way that allows me to do the whole group Visible or not.

    I tried to use a Cluster, but it has a side effect that all elements must be inside the controls or indicators, but not mixed.

    Is there any graphic element, like a panel that can contain other controls and indicators on the inside and make them Visible or not as a group regardless of whether they are commands or the LEDs?

    Good suggestions on how to do this?

    Thank you.

    The tab control is still not my favorite, appearance but it's a way fast and effective to show and hide groups of controls and indicators.

  • in Outlook Express, how can I send the same message to a group important (in the address book already), but have to each recipient can only see his name (not the Group)

    In Outlook Express, how can I send the same message to the large group (already in the address book), but have to each recipient can only see his name (not the Group)?

    To use the functionality of the BCC (Blind Carbon Copy), in a new message window, click View | All headers and type the addresses separated by a; Or: Click the button to. You will see your list of contacts and the choice to put them in the To, CC, or BCC field. Click on an address, and then click BCC to add it. Repeat for all of the contacts you want. (Note: most of the providers have limits as to how many messages you can send both a. 25 is common, but it varies).

    Put your own address in the box to. That's the only name/address that any recipient will see. If you leave the field empty, some people may not receive e-mail because of message rules they put in place, or restrictions imposed by their ISP.

    You can also make an entry in the address book using your e-mail address, but put something like the mailing list in the area of the display.

    *********************

    You can also create groups if you send e-mail to the same people often.

    To create a group of contacts:

    You can create a single group name (or alias) to use when sending a message to several contacts at the same time. Just create a group name and add individual contacts to the group. Then just type the name of the group in the box for when you send mail.

    1. in the address book, select the folder in which you want to create a group. Click New in the toolbar, and then click New Group.
    2. the Properties dialog box opens. In the group name box, type the name of the group.
    3. There are several ways to add people to the Group:
    a. to add a person from your address book list, click Select members, and then click a name in the address book list.
    (b) to add a person directly to the group without adding the name to your address book, type the person's name and e-mail address at the bottom of the Properties dialog box and then click Add.
    to add a person to both the Group and your address book, click New Contact and enter the appropriate information.
    (d) to use a directory service, click Select members, and then click search. Select a directory service in the drop-down list at the end of the text box. After finding and selecting an address, it is automatically added to your address book.
    4. Repeat for each addition until your group is defined.

    Note

    a. to view a list of your groups separately from the list of address book in the address book on the view menu, make sure that folders and groups is selected.
     
    b. you can create multiple groups, and contacts can belong to several groups.

    If you want to send to a group without addresses are displayed for each recipient, open the address book and make a new entry. Enter the name of the group in the area of the display, but use your address. (Some Internet service providers require a legitimate address in the line to and recipients will know it's from the Group).

    Click on the button to. Enter the name of the group using your address. Enter the group in the BCC field.

  • I can not connect to my computer laptop get "the Group Policy client service has no connection. Access denied. "

    I can not connect on my lapto even if the password is correct. I'm getting "the political group Clinet impossible service connection access Denined.

    Original title: I can not connect on my laptop even if the password is correct

    HI, John Angelo2,.

    Try rebooting and tapping F10 to achieve the recovery screen

    You can choose to repair or restore your system

    Select Restore to an earlier time

    If it is impossible to do the above, use the installation start screen repair DVD

    This problem is caused by your user profile/registry settings/system files corruption

    Response of Mouneshawar R.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/the-Group-Policy-client-service-failed-the-logon/6b069a74-8524-442c-8ff1-d723e2a4e992

    Re-create the profile or restore the file ntuser.dat from the back to the top

    http://social.technet.Microsoft.com/forums/en-us/itprovistaapps/thread/c88515b4-4be7-4f6f-9988-80f8a5683b41/

    You can post on the Technet forum for help

    How to customize the default local user profile when you prepare an image of Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2

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

    Assign a mandatory user profile

    http://TechNet.Microsoft.com/en-us/library/cc786301 (WS.10) .aspx

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

    http://msdn.Microsoft.com/en-us/library/bb776895 (v = vs. 85) .aspx

  • Why windows does not connect to the Group Policy client?

    I am currently using a dell inspiron with windows 7 Edition 7720 Home premium and recently a message started to appear above my taskbar saying

    "Unable to connect to a windows service.
    Windows could not connect to the Group Policy Client service. The problem prevents standard users to log on to the system.
    As long as administrator, you can go through the system event log to see why the service failed"
    Anyone know why this is happening and how to fix it?

    The resolution is quite easy. Ignore all these tech geeks here and on other sites that just want to show how they can play with the registers - a very dangerous game.  Go to search, type in cmd, open cmd as administrator.  Type exactly this (with the indicated spaces): netsh winsock repair, and then press ENTER. You need to restart (NOT close and turn on) your computer. Bingo! Unfortunately, this condition can re - occur from time to time, as if you start your computer before you turn on your internet connection and establish a good connection.  Don't worry the fix takes about 3 to 5 minutes depending on your speed of restart computer.

  • Virtual router does not work-«the group or resource is not in the appropriate State to make the request in question»

    I installed virtual router manager v1.0 but his does not work. When I leave router virtual by connection to the local network from my laptop, its shows an error. It is «the group or resource is not in the appropriate State to make the request in question» Please give me the solution of this problem. I want to start the virtual router and use the internet connection with other devices.

    I installed virtual router manager v1.0 but his does not work. When I leave router virtual by connection to the local network from my laptop, its shows an error. It is «the group or resource is not in the appropriate State to make the request in question» Please give me the solution of this problem. I want to start the virtual router and use the internet connection with other devices.

    Thank you so much for viewers. Virtual router works properly. I use internet for my laptop for my other devices.

  • "the Group Policy client service could not denied logon.access '.

    user cannot connect to windows, receive the following error message: "the Group Policy client service could not denied logon.access '.

    other users can connect to his pc, but it can not connect to any pc in the field. (problem affecting only about the user)

    Hi KofiPete,

    I suggest you to send your request in the TechNet Forums to improve assistance in this regard. They are experts in your field of investigation and would be in a better position to answer your concerns.

    Post here: https://social.technet.microsoft.com/Forums/en-US/home?category=w7itpro&filter=alltypes&sort=lastpostdesc

    It will be useful.

  • Error 1068: The dependency service or beginning of the group don't did not (opnvpn)

    I don't know what happened. This morning I've disinstalled Avast (has been exceeded) and I installed clamwin, I turned off the PC and I now find myself a lot of suspended services. I have adescovered this how the VPN has not begun more and I noticed the service was discontinued; If I try to start receiving it I get the message "the group starting" or the dependency service not succeeded. If I go ' computer > management > services and applications > key dx > and try to starts, I get the message "error 1068: beginning of the group or the dependency service not succeeded." In relationships of dependency I find DHCP Client is active, but I cannot find TAP-Win32 Adapter V9? thing is? where should I fint it?
    I also tried to perform "System Restore configuration", but without seccess it says that cannot replace the file c: Windows...
    not him one more thing to do... He is someone who can help me
     
    Thanks in advance
    P.S. Sorry for my English

    Hi jhon,

    The TAP-Win32 virtual device must be displayed when you expand your network adapter in the device, BUT Manager - you must first enable 'Show hidden devices' in the 'View' menu in Device Manager.
    Have you tried re-installing/or repair (in programs and features) your VPN software to see if it fixes your OpenVPN configuration?
    The Avast software may have removed the necessary to OpenVPN TAP-Win32 driver run. My recommendation would be (if the above does not work) to re - install your laptop network drivers, then re - install OpenVPN more cleaner to see if there find any key obsolete reg of execution related to Avast CCleaner registry is no longer required.
    Avast would have installed its own driver to perform the inspection of packets with state - the removal of Avast and the driver he used to perform this function probably caused your problem with your VPN software and any driver virtual he used...
    I would also like to launch any program Avast uninstaller that may be available. I know that you already have, but the uninstall program can may able to detect and clear old files/reg keys was using Avast. For any future reference - always use the uninstall program own anti-virus' and no 'programs and features' to uninstall your antivirus.
    Hope this helps
    Martin
  • How to use the Group condition in the ODI mappings

    Hi Experts,

    I have a requirement in the customization of BI applications. Can you please someone explain how to use the LISTAGG function in odi mapping.

    I applied the LISTAGGR function at the level of mapping odi, but I get error below.

    Mapping of ODI: ColumnName: ENAME Expression: LISTAGG (EMP. ENAME, ",") THE GROUP (RANKING BY EMP. ENAME)

    Error:

    ODI-1240: Flow LIST_AGG_FUN_USAGE fails during an operation of integration. This flow of charge table target EMP_BI.

    ODI-1228: task failed LIST_AGG_FUN_USAGE (integration) on the scott_db of ORACLE target connection.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00937: not a function of simple-group


    Oracle query:

    If I used this sql query in the database the correct result is.

    SELECT DEPTNO, LISTAGG (ENAME, ',') WITHIN THE EMP EMP (ENAME CONTROL) GROUP. DEPTNO;

    Output:

    10CLARK, KING, MILLER
    20ADAMS, FORD, JONES, SCOTT, SMITH
    30ALLEN, JAMES, MARTIN, BLAKE, TURNER, WARD


    Please give your valid solutions, thanks in advance.

    Kind regards

    REDA

    If you try in #ODI12C then in the set of properties, you can select the column which should be used to group by.

    If it's 11g so its bit complicated. Simply replace the mapping with below codes.

    LISTAGG (EMP. ENAME, ",") WITHIN GROUP (ORDER BY ENAME) / * sum() * /.

    Magic!

    Thank you

    Chantal

  • Apex 5, user "Is in the group" works for authorization seems to not work

    Hello team Apex,

    Apex 5

    I would use the construction Type of plan (user) "Is in the group" authorization feature, but it seems to not work.

    The user is in the group but nevertheless is not allowed.

    I checked this with "& APP_ALIAS. ' in the group element - that's how I would use it - and the Group static 'true' name too.

    (We have a group for all applications, where the group name is the same name of the App - just to understand the call below.)

    When I use it to place a further authorization scheme with "PL/SQL function body:

    Return apex_util.current_user_in_group (v ('APP_ALIAS'));

    -It works as expected.

    Can you please verify this?

    Thank you in advance!

    Concerning

    André

    Hi Andre,

    What type of authentication scheme you use? Because, according to the text of the authorization scheme aid groups will be just picked up for the authentication of the account of the APEX.

    • Group: enter a group name. Authorization succeeds if the group is activated as a dynamic group for the session (see APEX_AUTHORIZATION. ENABLE_DYNAMIC_GROUPS). If the application uses authentication to accounts Express request, this check also includes workspace groups that are granted to the user. If database authentication is used, this check also includes database roles that are granted to the user.

    I just tried "Is in the group" and had no problem to check my groups.

    BTW, in your PL/SQL code, there is no need to use the function of V, just use bind variables as syntax: APP_ALIAS

    Concerning

    Patrick

  • Why the feature multiple column indexes using index skip scan?

    Hi all

    I have just been hired by a new company and I explored its database infrastructure. Interestingly, I see several function based indexed column used for all the tables. I found it strange, but they said ' we use Axapta to connect Axapta with Oracle, function index according to should be used to improve performance. Therefore, our DBAs create several indexes of feature based for each table in the database. "Unfortunately, I can not judge their business logic.

    My question is, I just created similar to my local database tables in order to understand the behavior of the function index according to several columns. In order to create indexes of based function (substr and nls_lower), I have to declare the columns as varchars2. Because in my business our DBAs had created a number of columns as a varchar2 data type. I created two excatly same table for my experience. I create miltiple function according to index on the my_first table, and then I create several normal index on the my_sec table. The interesting thing is, index skip scan cannot be performed on more than one basic function index (table my_first). However, it can be performed to normal several index on my_sec table. I hope that I have to express myself clearly.

    Note: I also ask the logic of the rule function based index, they said when they index a column they don't ((column length) * 2 + 1) formula. For example, I want to create indexes on the zip code column, column data type VARCHAR2 (3), so I have to use 3 * 2 + 1 = 7, (substr (nls_lower (areacode), 1, 7). substr (nls_lower ()) notation is used nested for any function function index. I know that these things are very illogical, but they told me, they use this type of implementation for Axapta.

    Anyway, in this thread, my question is reletad to function function with index index skip scan, not logical bussiness, because I can not change the business logic.

    Also, can you please give hints or clues for multiple function based indexes?

    Thanks for your help.


    SQL > create table my_first as select '201' codeZone, to_char (100 + rownum) account_num, dbms_random.st
    Ring name ('A', 10) from dual connect by level < = 5000;

    Table created.

    SQL > create table my_sec as select '201' codeZone, to_char (100 + rownum) account_num, dbms_random.st

    Ring name ('A', 10) from dual connect by level < = 5000;

    Table created.

    SQL > alter table my_first change account_num varchar2 (12);

    Modified table.


    SQL > alter table my_sec change account_num varchar2 (12);

    Modified table.

    SQL > alter table my_first change codeZone VARCHAR2 (3);

    Modified table.

    SQL > alter table my_sec change codeZone VARCHAR2 (3);

    Modified table.

    SQL > create index my_first_i on my_first (substr (nls_lower (areacode), 1, 7), substr (nls_lower (account_num), 1, 15));

    The index is created.

    SQL > create index my_sec_i on my_sec (area code, account_num);

    The index is created.

    SQL > analyze table my_first computing statistics for all columns indexed for all indexes.

    Parsed table.

    SQL > analyze table my_sec computing statistics for all columns indexed for all indexes.

    Parsed table.

    SQL > exec dbms_stats.gather_table_stats (USER, 'MY_FIRST');

    PL/SQL procedure successfully completed.

    SQL > exec dbms_stats.gather_table_stats (USER, 'MY_SEC');

    PL/SQL procedure successfully completed.

    SQL > my_first desc;
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    CODEZONE VARCHAR2 (3)
    ACCOUNT_NUM VARCHAR2 (12)
    NAME VARCHAR2 (4000)

    SQL > desc my_sec
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    CODEZONE VARCHAR2 (3)
    ACCOUNT_NUM VARCHAR2 (12)
    NAME VARCHAR2 (4000)

    SQL > select * from my_sec where account_num = '4000';


    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 1838048852

    --------------------------------------------------------------------------------
    --------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). TI
    me |

    --------------------------------------------------------------------------------
    --------

    |   0 | SELECT STATEMENT |          |     1.    19.     3 (0) | 00
    : 00:01 |

    |   1.  TABLE ACCESS BY INDEX ROWID | MY_SEC |     1.    19.     3 (0) | 00
    : 00:01 |

    |*  2 |   INDEX SKIP SCAN | MY_SEC_I |     1.       |     2 (0) | 00
    : 00:01 |

    --------------------------------------------------------------------------------
    --------


    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - access ("ACCOUNT_NUM" = '4000')
    Filter ("ACCOUNT_NUM" = '4000')


    Statistics
    ----------------------------------------------------------
    1 recursive calls
    0 db block Gets
    Gets 7 compatible
    0 physical reads
    0 redo size
    543 bytes sent via SQL * Net to client
    384 bytes received via SQL * Net from client
    2 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    SQL > select * from my_first where substr (nls_lower (account_num), 1: 25) = '4000';


    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 1110109060

    ------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |          |     1.    20.     9 (12) | 00:00:01 |
    |*  1 |  TABLE ACCESS FULL | MY_FIRST |     1.    20.     9 (12) | 00:00:01 |
    ------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    1 Filter (SUBSTR (NLS_LOWER ("MY_FIRST". "" "" ACCOUNT_NUM")(, 1, 15) ="4000"
    AND SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 25) = '4000')


    Statistics
    ----------------------------------------------------------
    15 recursive calls
    0 db block Gets
    Gets 26 consistent
    0 physical reads
    0 redo size
    543 bytes sent via SQL * Net to client
    384 bytes received via SQL * Net from client
    2 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    SQL > Select / * + INDEX_SS (MY_FIRST) * / * from my_first where substr (nls_lower (account_num), 1: 25) = '4000';


    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 2466066660

    --------------------------------------------------------------------------------
    ----------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU).
    Time |

    --------------------------------------------------------------------------------
    ----------

    |   0 | SELECT STATEMENT |            |     1.    20.    17 (6) |
    00:00:01 |

    |*  1 |  TABLE ACCESS BY INDEX ROWID | MY_FIRST |     1.    20.    17 (6) |
    00:00:01 |

    |*  2 |   INDEX SCAN FULL | MY_FIRST_I |     1.       |    16 (7) |
    00:00:01 |

    --------------------------------------------------------------------------------
    ----------


    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    1 - filter (SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 25) = '4000')
    2 - access (SUBSTR (NLS_LOWER ("ACCOUNT_NUM"), 1, 15) = '4000')
    Filter (substr (NLS_LOWER ("ACCOUNT_NUM"), 1, 15) = '4000')


    Statistics
    ----------------------------------------------------------
    15 recursive calls
    0 db block Gets
    857 consistent gets
    0 physical reads
    0 redo size
    543 bytes sent via SQL * Net to client
    384 bytes received via SQL * Net from client
    2 SQL * Net back and forth to and from the client
    0 sorts (memory)
    0 sorts (disk)
    1 rows processed

    Check MoS for a bug with the FBI and Skip Scan - it sounds like it could be a bug.

    On 11.2.0.4 with your sample code 10053 trace shows the optimizer whereas an index FULL scan to the point where she should consider an index SKIP scan for "unique table path".

    A person with 12.1.0.1 practice would like to run your test and see if it's fixed in this version.

    Concerning

    Jonathan Lewis

  • Scrolling group problem: not all the group with scrolling content?

    Helloooow peoplez script wise.

    I was biting my nails on this problem, the last two days and still have not found a solution. Go here:

    I tried to make a window (or Panel actually, because ultimately it must be run from the EI > window > scriptname.jsx), with a scroll bar, which can scroll content in a group beside him. I can get the scroll and all group, but is the problem, just now, that the elements of x in the group, the last get cut. Like this (it is supposed to be 500 buttons):

    Screen Shot 2015-10-13 at 21.40.05.png

    The only way that I was able to get the 'internal' group grow is by not using do not align properties and manually set the .size. I know that the content is here because the last element arises, when I move the last location of points [1] upwards until he reached the top of the group. I tried to refresh the page layout (layout.layout (true); layout.resize (()) to each call of the function onChanging() of the cursor, but without success. Read a lot of forum posts beautiful and discussion by @Marc Autret and other users of scriptUI/extendscript long has this far been without success.

    TL; DR: I'm doing a group with a lot of content that I can scroll with a scroll bar.

    Here is the code snippet, I hope fairly well commented:

    {
    //scroller test
    // uncomment the temp path (replace with some image file path) and the lines inside the populateGrid() function to reproduce my problem better
    // I'm ussing an image 512x288 pixels
    
    
    //var tempPath = "/Volumes/Verbinski/02_SCRIPTING/After_Effects/stockholm/ROOT/EXPLOSIONS/Fireball_side_01/Thumbs/Fireball_Side_01_024.jpg";
    
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = -5;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 10000; // tried changing this to all sorts of interesting numbers.
    
    
    //This should move the group, created further down.
    scroller.onChanging = function(){
      grid.location = [grid.location[0],-scroller.value];
    }
    
    
    // "Boundary" for grid (see below)
    var gridArea = mWin.add('panel',undefined,'gridArea');
      gridArea.size = [mWin.size[0]-40,mWin.size[1]-40];
    
    
    // The grid... a digital fronteer... and also container of stuff
    var grid = gridArea.add('panel',undefined,'grid');
      grid.size = [gridArea.size[0]-20,9000000000] // no matter how high I put this, it doesn't change a thing
    
    
    // Just an array for all the images to go
    var clips = [];
    // Total height gets calculated in the populateGrid function.
    var totalHeight = 0;
    
    
    function populateGrid(rows){
      var img;
      for(i=0;i<rows;i++){
      // img = grid.add('image',undefined,tempPath);
      // clips.push(img);
      grid.add('button',undefined,i);
      }
      for(i in clips){
      clips[i].location = [0,(clips[i].image.size[1]*i)]
      }
      // totalHeight = (img.image.size[1]+grid.spacing)*rows;
      // grid.size = [grid.size[0],totalHeight]
      // scroller.maxvalue = totalHeight/2;
    
    
    }
    
    
    // put x number of buttons/images into the grid
    populateGrid(500);
    
    
    // shwo to window
    mWin.show();
    mWin.center();
    }
    

    Reaally hope someone here sees this and can help out me.

    Cheers, Fynn.

    My Control Panel:

    retina 5K, 4 GHz Intel Core i7 iMac

    32 GB of RAM, 512 GB SSD HARD drive

    OSX Yosemite: 10.10.4

    AE: CS6 |  CC 2014: 13.1.1.3

    Aaalrighty, guys. It seems to me have cracked... Sort of...

    David, your version worked quite well, I just modified a bit to get the right calculation.

    The wheel now works as expected and the scroller.maxvalue is calculated as ((number of items) * height of the first item).

    Everything works fine until I have started using the automatic layout manager. The option 'fill' at least makes it really hard to understand the final height of the internal objects. So they must be defined accordingly.

    Indeed, here is my modified code (sorry, @David for resources according to the version string, you may simply copy the scroller.onChanging () and populateGrid() x parts))

    {
    //scroller test
    // I'm using an image of around 512x288 pixels
    
    var tempPath = "YOUR IMAGE HERE";
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = 0;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 3000; // tried changing this to all sorts of interesting numbers.
    
    //This should move the group, created further down.
    var scrollDiary = 0;
    scroller.onChanging = function(){
      var scrollVal = Math.abs(scroller.value)-scrollDiary;
      for(i=0;i		   

Maybe you are looking for