order by clause and index access

Hi all

I have tried under request.

SELECT e.employee_id, e.department_id
E EMPLOYEES
order by 2;

Implementation plan...

SELECT STATEMENT, GOAL = ALL_ROWS 4 107 856
SORT ORDER BY 4 107 856
TABLE ACCESS FULL     EMPLOYEES OF HR 3 107 856

Below query Oracle by using the INDEX FULL SCAN. I'm not able to find an appropriate explanation. Pls how me oracle optimizer include order by clause while to fetch documents.

-departmentId has index EMP_DEPARTMENT_IX, which is the normal index.

SELECT e.employee_id, e.department_id
E EMPLOYEES
order by 1;

SELECT STATEMENT, GOAL = ALL_ROWS 3 107 856
TABLE ACCESS BY INDEX ROWID HR 3 107 856
INDEX FULL SCAN     HR EMP_EMP_ID_PK 1 107


Thank you.

Consolidation of the index factor is used by the CBO to calculate how much is a scan interval index (the one that is followed by a table-access by rowid) for this index will be. The CBO calculates this option to select an index if two or more paths index are available.
But it could also be used to decide between choosing a full index scan (to honor an order by clause and without having to sort after the scan) in the course of a full table scan that requires an extra sort (in honor of the order by clause) operation.

There are many articles talking about this:

http://www.oaktable.NET/category/tags/clustering-factor

http://Oracle-Randolf.blogspot.com/2010/01/clusteringfactor-what-if-analysis.html

http://mehrajdba.WordPress.com/2009/02/09/index-clustering-factor/

I just realized today that in case you described: If department_id column is NULL-able, Oracle cannot use the index in department_id to honor the order by clause, because he would find all the lines (those with an id of NULL service), in this case.

Tags: Database

Similar Questions

  • like clause and index access

    Hi all

    I went through the link below for the use of the index while using LIKE operator in SQL.
    [http://laurentschneider.com/wordpress/2009/07/how-to-tune-where-name-likebc.html]

    I tried the same approach in the Table Employees, but index not used.

    -There is a normal Index on the Job_id found: EMP_JOB_IX.

    SQL10.2 > select / * + INDEX (EMP_JOB_IX employees) * / e.job_id, e.first_name
    employees e where e.job_id like '%ABC% ';

    -Explain plan
    SELECT STATEMENT, GOAL = 3 5 80 ALL_ROWS
    TABLE ACCESS FULL 3 5 80 HR

    Pls know me why it's full table scan. (using version 10.2)

    Thank you

    you are the aliasing, try using the name of the table, but don't use do not alias to index...

    select /*+ INDEX(e ,EMP_JOB_IX)*/
    

    Ravi Kumar

  • RBO and Index access


    Hi I have a 9i database that uses a RBO and we have a query as follows

    tab, select min (a) where b = '111' and c = '1234444' and a > 0;

    We have an index of primary key on the columns a, b and c.Unfortunately the query makes a full table scan, even if the index is present. East - this behaviour will rule based optimizer? Should not go to the index that we select a single line?

    : Note the RBO is used in a production environment, and we cannot change it now.

    Query 1 uses an analysis complete of the index, it reads the ENTIRE index.

    A full table scan is replaced by a full analysis of the index, if there is a unique key of the table,

    Your interpretation of the results of the explain plan for query 1 is wrong: due to the incorrect table design and code wrong, it must use FULL scan restricted index, and he cannot use normal index access.

    If BOTH statements are ineffective due to the implicit conversion! TWO of them. Not a single one.

    And the lack of statistics in the database system Oracle uses the default values for IOSEEKTIM and IOTFRSPEED.

    The column ID in the second query is also authorized NULL, sort of to_number (ID) leads to NULL, which is never in a B-Tree index.

    Oracle did just what you ask. Design of database or application must be fixed, or you must put crutches (the indices of basic function) in the allover database, Oracle to compensate for the incorrect database and application design.

    ---------

    Sybrand Bakker

    Senior Oracle DBA

  • WITH the ORDER BY clause and bug SDO_GEOMETRY?

    I'm having a problem using SDO_GEOMETRY in a WITH clause. Specifically with ORDER BY. I'll show a shortened version of SQL here. I'm doing something wrong or is this a bug?

    It works:
                         SELECT 
            loc.location_id,
                        SDO_GEOM.SDO_DISTANCE(cent.lat_long, 
                        MDSYS.SDO_GEOMETRY
                        (
                        2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2.
                        '4326', 
                        SDO_POINT_TYPE(-78.6386145, 35.772096, NULL),
                        NULL,
                        NULL
                        ),
                       0.01, -- tolerance
                        'unit=mile') result_center_distance
                        
              
                         FROM location loc
                         JOIN centroid cent ON loc.centroid_id = cent.centroid_id
             ORDER BY result_center_distance
    After the statement select in a with clause, this does not work, which gives an identifier not valid "SDO_GEOMETRY" ORA-00904:
    WITH location_distance AS
    (
                         SELECT 
            loc.location_id,
                        SDO_GEOM.SDO_DISTANCE(cent.lat_long, 
                        MDSYS.SDO_GEOMETRY
                        (
                        2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2.
                        '4326', 
                        SDO_POINT_TYPE(-78.6386145, 35.772096, NULL),
                        NULL,
                        NULL
                        ),
                       0.01, -- tolerance
                        'unit=mile') result_center_distance                    
              
                         FROM location loc
                         JOIN centroid cent ON loc.centroid_id = cent.centroid_id
             ORDER BY result_center_distance
      ) SELECT * from location_distance
    If I duplicate the function of the distance in the ORDER BY, it works:
    WITH location_distance AS
    (
                         SELECT 
            loc.location_id,
                        SDO_GEOM.SDO_DISTANCE(cent.lat_long, 
                        MDSYS.SDO_GEOMETRY
                        (
                        2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2.
                        '4326', 
                        SDO_POINT_TYPE(-78.6386145, 35.772096, NULL),
                        NULL,
                        NULL
                        ),
                       0.01, -- tolerance
                        'unit=mile') result_center_distance                    
              
                         FROM location loc
                         JOIN centroid cent ON loc.centroid_id = cent.centroid_id
             ORDER BY                     SDO_GEOM.SDO_DISTANCE(cent.lat_long, 
                MDSYS.SDO_GEOMETRY
                (
                2001, -- SDO_GTYPE attribute: 2 in 2001 specifies dimensionality is 2.
                '4326', 
                SDO_POINT_TYPE(-78.6386145, 35.772096, NULL),
                NULL,
                NULL
                ),
                  0.01, -- tolerance
                'unit=mile')
      ) SELECT * from location_distance

    This is a bug. But it is set to 11g R2. Note that this is not a space bug, but a bug in generic compilation.

  • What is the order to turn off the constraints and index

    Hi, I need to make some out of constraints and indexes on tables to load quite a date in them. I know that I can just drop them and recreate later. But is it feasible to figure who forced and in what order must be do disable or unusable before a load and after the load that is to say. without dropping to preserve? R before P data loading, and then P before R like I think that controls can jump in evertytime and are quite safe to deal with. But I did not carefully think about more, maybe you have some scripts that say exactly what should be the order to turn off the coast and later on this subject.

    Thank you!

    Hello

    946279 wrote:

    Hi, I need to make some out of constraints and indexes on tables to load quite a date in them. I know that I can just drop them and recreate later. But is it feasible to figure who forced and in what order must be do disable or unusable before a load and after the load that is to say. without dropping to preserve? R before P data loading, and then P before R like I think that controls can jump in evertytime and are quite safe to deal with. But I did not carefully think about more, maybe you have some scripts that say exactly what should be the order to turn off the coast and later on this subject.

    Thank you!

    That's right: disable foreign key constraints before disabling the primary (or Unique) key constraint correspondent.  When you reactivate them, re - enable the constraint of primary (or Unique) key before the corresponding foreign key constraints.

    Aside from that, the order should not issue.

  • sys_context and order by clause

    Hi all

    IM using Oracle 11 g R2.

    Is it somehow possible to use the context variable (to store the column name) in the ORDER BY clause? My ultimate goal is to build by Order at run time, without using the concatenation.

    for example, I created context as my_ctx for some pkg and its variable as v_ctx with a value defined as 'TABLE_NAME '.
    So it is possible to use it as

    Select * from all_tables
    sys_context order ('my_ctx', 'v_ctx');

    If not, does perform a work around?

    Thank you
    Vivek

    Hi, Vivek,

    Vivek says:
    Hi all

    IM using Oracle 11 g R2.

    Is it somehow possible to use the context variable (to store the column name) in the ORDER BY clause? My ultimate goal is to build by Order at run time, without using the concatenation.

    Of course, you can use SYS_CONTEXT in an ORDER BY clause, but it is unclear what you are trying to do, so I don't know if SYS_CONTEXT will help you.

    for example, I created context as my_ctx for some pkg and its variable as v_ctx with a value defined as 'TABLE_NAME '.
    So it is possible to use it as

    Select * from all_tables
    sys_context order ('my_ctx', 'v_ctx');

    If not, does perform a work around?

    Post a full test script Hat people can run to recreate the problem and test their ideas. Show the output you want from the parameters a data you give.

    Consider using a CASE expression in the ORDER BY clause. You can use SYS_CONTEXT in the expression BOX, if you wish.

  • [CS3] Indexing, order of sorting and spaces

    Hello

    Can someone tell me if it is possible to get indexing in CS3 to treat space as a character important in terms of the sort order. An example:

    If I have two names, say Cilla Black and Tony Blackburn and the expressions 'Black and white', 'Black Mountain' and the word 'Black' I expect to find the entries in the order

    Black and white

    Black, Cilla

    Black Mountain

    Blackburn, Tony

    Blacken

    In other words '< space > black' comes before 'blacka"which in turn comes before"blackb"and so on.  I checked the indexes in a number of books and they do this kind of thing.

    In InDesign, the themes come from in order

    Black and white

    Blackburn, Tony

    Black, Cilla

    Blacken

    Black Mountain

    So it seems to be ignoring the comma and space as if sorting

    BlackAndWhite

    blackburntony

    blackcilla

    blacken

    Blackmountain

    Is it possible to stop it short of a few very specific sort key values (e.g. black1 black2, black3) which are highly likely to be broken if I add additional items to the index?

    Thank you.

    InDesign sorts its letter-by-letter indexes while you want is word for Word - for details, see http://www.kahrel.plus.com/indesign/sort.html

    Unfortunately, you cannot change this behavior in InDesign itself. But using the page sorter in this link, you can choose a strategy of the kind. This sorter, by the way, is a paragraph sorter, so if you have any subtopics that you would have to combine the topics and subtopics in a paragraph and then sort, then sous-sujets files. It is not ideal (and slow), but at least it gives you the desired result (or a very close, anyway).

    Peter

  • Problem in the SQL because of the order by clause

    Hi all
    I am facing a problem in a sql query. I use Oracle 10 g 2.
    Query is given below:
    SELECT t1.ename
            FROM T1, T2
           WHERE T1.EMPNO = 1234
             AND T1.ACCOUNTNO = T2.ACCOUNTNO
             AND T1.SEQ = T2.SEQ
           ORDER BY T2.SEQ
    The query Plan is:
    .----------------------------------------------------------------------------------------------------
    | Id  | Operation                     | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
     ----------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT              |                      |     2 |   218 | 11716   (1)| 00:00:41 |
    |*  1 |  TABLE ACCESS BY INDEX ROWID  | T1                   |     1 |    89 |     1   (0)| 00:00:01 |
    |   2 |   NESTED LOOPS                |                      |     2 |   218 | 11716   (1)| 00:00:41 |
    |*  3 |    TABLE ACCESS BY INDEX ROWID| T2                   |     2 |    40 | 11715   (1)| 00:00:41 |
    |   4 |     INDEX FULL SCAN           | PK_T2_SEQ            | 58752 |       |   122   (5)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN           | FK_ACCOUNTNO         |     3 |       |     0   (0)| 00:00:01 |
     ----------------------------------------------------------------------------------------------------
    Now, I want to reduce the time of this request.

    If I remove order by clause query that the query performance is quite perfect, but with order by clause its take time.

    I already set SORT_AREA_SIZE, but still nothing improves.

    Welcome and thank you for your suggestions.

    Thank you

    Published by: BluShadow on June 23, 2011 07:55
    addition of {noformat}
    {noformat} tags and formatted explain plan to make it readable.  Please see {message:id=9360002} for details on how to post code and data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    Hey, a quick test, try:

    select ename from (
    SELECT t1.ename, T2.SEQ
    FROM T1, T2
    WHERE T1.EMPNO = 1234
    AND T1.ACCOUNTNO = T2.ACCOUNTNO
    AND T1.SEQ = T2.SEQ
    and rownum > 0)
    ORDER BY SEQ
    

    Amiel Davis

  • Partitioned Tables and indexes

    Hello


    I have a question on the table and index partitioning. My scenario is:

    Charge 2 mio records in table T once a month. Loaded records are added to existing records, and once loaded data is never changed.
    At some point, I want to delete the older recordings, so I intend to this partition table.

    T table looks like:
    create table t (id       number(10) not null  constraint t_pk primary key,
                    period   number(10) not null,
                    contract number(10) not null,
                    attr     number(10) not null);
    
    create unique index t_ux1 on t(contract,period);
    
    create index t_ix2 on t(period);
    My plan is to partition T over the period, and I'm trying to read through the concepts
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14220/partconc.htm#g471747


    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »


    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    If true, what will happen when a partion fell?


    I am new in this area, so please feel the comment as you wish.


    Concerning
    Peter


    BANNER
    ----------------------------------------------------------------
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64bi
    PL/SQL version 10.2.0.3.0 - Production
    CORE Production 10.2.0.3.0
    AMT for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - production
    NLSRTL Version 10.2.0.3.0 - Production

    Peter Gjelstrup wrote:

    My question is now, how to manage the indexes, the t_pk, the t_ux1 and the t_ix2. Concepts of say,

    «1. If the table partitioning column is a subset of index keys, use a local index.»

    "2. If the index is unique, use a global index. If this is the case, you are finished. »

    So, that's how I read it
    -t_pk is unique, so this should be global
    -t_ux1 of columns is a subset, unless I have misunderstood (?), which should be local
    -index t_ix2 column is the same as the partitioning column, so it must be local

    Is this right, this t_ux1 should be a local partioned index, even if the period is the second column in the index?

    A partitioned index locally can only be defined as unique if the partition key is part of the columns in the index. Imagine what the database would have to do if this is not the case: in order to verify if a newly added or updated value violates the uniqueness, it will have to travel all the partitions in a serialized operation - means that no one else could do the same thing at the same time. Since he is a killer of serious scalability in terms of locking and contention, this is not allowed.

    So: Your T_UX1 index can be defined as a unique index that is local because it contains the partition key. Although the index is not prefixed ("Prefix" means that it is divided by the left side of the columns in the index) which means that there may be access patterns where all partitions should be scanned or the optimizer cannot use a method of size of effective partition according to the way the index is reached.

    Your T_PK index cannot be set as local because it must be unique (you can not use a local non-unique index in this case), but does not contain your partition key. It must be a global index. An overall index can be partitioned as well (different from the underlying table) but it doesn't have to be.

    Depends on how you access your data you have not T_IX2 index when partitioning by this key because it corresponds to the partition key and therefore could not actually be used by the mechanism of partition pruning that limit your query to the scores of individuals.

    If you have more than one MAS environment where running queries are used longer, you should be fine with the index the in general (because they could be analyzed in parallel in parallel operations), but if you have an OLTP environment, then you should avoid local no prefix indexes due to the potential problem that you need to analyze all partitions.

    Be borne in mind that with partitioning adds an important layer of complexity to other areas: in particular the options available to the optimizer and analyze cost optimizer statistics. Depends on how you access your statistical data must be maintained on several levels now (level of score and at the global level, in the case of subpartitioning may be still at this level). If your data is important and you rely on "global" level statistics (these are always the case when the optimizer at the time analysis cannot limit access to a single partition) then in the pre - 11 g databases analyze these "global" level statistics can take a lot of time and resources, since actually , you need data several times (once for the partition and even global level).

    Presenting this partitioning may mean other potential problems in terms of execution that change (not for the better sometimes) plans and how to effectively collect statistics. Note that g 11 addresses the issue of 'statistics' by introducing the so-called "extra" global statistics. Greg Rahn wrote a [blog note | http://structureddata.org/2008/07/16/oracle-11g-incremental-global-statistics-on-partitioned-tables/] on this nice feature.

    >

    If true, what will happen when a partion fell?

    Since you're already on 10g, you can specify the database to update the scores of the local index using the UPDATE of the INDEX clause, while 9i could maintain only an overall index and it is up to you to rebuild the local index partitions after the partition DDL on the table (according to the DDL operation).

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

    Published by: Randolf Geist on Sep 30, 2008 16:39

    Added statistics / optimizer warning when you use the partitioning

  • process of execution of the order by clause

    What is the process of execution of the order clause in the sql statement and how it will affect the performance of the query.

    Siddharth Singh says:
    What is the process of execution of the order clause in the sql statement

    Depends on. First of all, that you mean "alrogithmically, how Oracle data products ordered"? There are a number of different approaches. Data can be ordered as you pick up sequentially from an index. Or it can be explicitly materialized and sorted.

    and how it will affect the performance of the query.

    Depends on. There could be no impact because it relies on the index to classify the data and index is the most effective path independently of the presence of an ORDER BY. Or it could require a huge amount of time to materialize and sort several GB of data.

    Justin

  • I disabled the toolbar &gt; &gt; Menu button (via a right click on a PC, Windows 7) and cannot access the toolbar to add items to the sail back in. Any ideas?

    I disabled the toolbar > > Menu button (via a right click on a PC, Windows 7) and cannot access the toolbar to add items to the sail back in. Any ideas?

    Don't see the menu bar not (File, Edit, View, history, Favorites, tools, help)?
    Turn on/off the menu bar is a new feature in version 3.6.
    (Linux and OSX see: what happened to the file, edit and view menus? )
    Windows Method 1. Press and hold the key and press the letters of the following in this exact order: V T M
    Windows method 2 Press and release the button. The Menu bar is displayed; then choose ~ ~ red: V ~ ~ iew > ~ ~ red: T ~ ~ oolbars and click on ~ ~ Red: M ~ ~ enu Bar.
    The menu bar should now be displayed permanently, unless you turn it off again using view > toolbars. Check = not displayed, NO check mark is not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing

    Navigation, bar toolbar bookmarks and other toolbars under view > toolbars. By clicking on one of them will place a check mark (display) or remove the check mark (not shown).

    To display the status bar, view, and then click status bar to place a check mark (display) or remove the check mark (not shown).

    Mode full screen
    http://KB.mozillazine.org/netbooks#Full_screen

    See also:
    Back and front toolbar buttons or others are missing
    Customize controls, buttons, and Firefox toolbars

  • my computer has crashed - my system is vista - I cant acess microsoft work and cannot access any document

    Vista is my system - new drive hard installed cant access my documents of work or can not access the microsoft works - I installed office 2010 trial but this does not happen worls - what can I - works was installed on my computer vaio sound, so I have no CD to reinstall

    Hello

    Contact Sony technical support

    How to replace Microsoft software or hardware, order service packs and replace product manuals

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

  • processing order of encryption and ACLs

    Hi people,

    I am preparing to a test lab and have the following scenario:

    R6---172.16.50/24---PIX---172.16.10/24--R1

    R6 I have two interfaces:

    lo0 6.6.6.6/24

    FA0/1 172.16.50.50/24

    R1 two int:

    lo0 1.1.1.1/24

    E0 172.16.10.1/24

    I want to protect all traffic between the 6.6.6.0 and network 1.1.1.0 with IPSec. I use ESP to protect traffic.

    Another condition is that I want to put an ACL to e0 allowing IPSec traffic.

    I created an ACL named ACL_E0_IN that is applied on e0 for inbound traffic.

    R1 #sh of access lists

    Expand the IP ACL_E0_IN access list

    esp permits 172.16.50.50 host 172.16.10.1 (15 matches)

    permit udp host 172.16.50.50 host 172.16.10.1 eq isakmp (116 matches)

    refuse the log host 1.1.1.1 icmp host 6.6.6.6 (5 matches)

    Ping of R6 R1 does not work:

    R6 #p 1.1.1.1 source lo 0

    Type to abort escape sequence.

    Send 5, echoes ICMP 100 bytes of 1.1.1.1, time-out is 2 seconds:

    Packet sent with the address source 6.6.6.6

    .....

    Success rate is 0% (0/5)

    R6 #.

    On the R1, I get the following message:

    * 8 Mar 03:58:37.917: % s-6-IPACCESSLOGDP: ACL_E0_IN denied icmp 6.6.6.6 - list

    > 1.1.1.1 (8/0), 4 packs

    This scenario works ONLY when I allow ICMP of R6 and ESP traffic.

    I wonder why the decrypted packets are denied by the ACL. I expect that the ACL is processed BEFORE the packet is decrypted. When I look at the meter on the hit of the ACL, it seems that the ACL is checked twice.

    Someone at - it an idea on the exact order of encryption and the treatment of the ACL?

    Thank you

    Michael

    Attached you will find the configs of the R1 and R6

    Michael

    I recently saw an explanation of encryption and ACLs that indicates there has recently been a change in behavior. In most versions of IOS, the behavior is as you describe, the package is evaluated by the ACL twice. The explanation is that the package is evaluated first in his State encrypted to check that it was something that must be dealt with. After the package has been decrypted, the IOS necessary to assess the package decrypted to see if things like the quality of Service necessary to apply. So basically the decrypted packet passed through the interface again and the ACL again. In recent versions of the code (12.3 (4) T, if memory serves) a change has been made and the package will now go through the ACL only once.

    HTH

    Rick

  • How to remove the Order By clause

    How can I get rid of the Order By clause in the underlying SQL query? I created a simple hierarchy, but when I use the hierarchy in the analysis and then come down, the results show multiple occurrences of each child. For some reason, I was able to reduce the number of occurrences of each child by adding a saved filter.

    I was expecting this:

    Expected.jpg

    Instead, I got this:

    Actual.jpg

    The generated physical query looks like this:

    SET VARIABLE QUERY_SRC_CD = "report"; SELECT s_0, s_1, s_2, s_3, s_4 s_5, (FROM s_6)

    SELECT

    s_0 0,.

    CAST (NULL AS VARCHAR s_1 (1)).

    "Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.

    'All the colleges' s_3,.

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").

    MOUNT s_5 (NULL AS DOUBLE),

    "Registration - College". "" Counties of schooling. "" Full-time student "s_6

    "REGISTRATION - College".

    UNION ALL

    SELECT

    1 s_0

    "Registration - College". «Dimensions of the inscription '.» "" Name of College "s_1,.

    "Registration - College". «Dimensions of the inscription '.» "' Exercise ' s_2,.

    'All the colleges' s_3,.

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_4 all Colleges").

    IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". ("' S_5 College ').

    "Registration - College". "" Counties of schooling. "" Full-time student "s_6

    "REGISTRATION - College".

    WHERE

    ("Registration - College". «Dimensions of the inscription '.» ("' Exercise ' IN ('201213')) AND (IDOF ("registration - College". «Hierarchies of the inscription '.» "College". ". (("' Colleges ') (1))

    ) djm ORDER OF 1, 3 ASC NULLS LAST, 4 ASC NULLS FIRST, 5 ASC NULLS FIRST, 2 ASC NULLS FIRST, NULLS FIRST CSA 6

    EXTRACT FIRST 10000000 LINES ONLY

    HI mbengue,.

    Check the report you are running any column presentation sorted in the user interface (in which case the order by clause will creep into generated sqls Physics). Also, I think that its worth it to check the settings of the hierarchy you have configured and if the installation program for the calculation of the measured column (number of students in this case), has been done correctly.

    Kind regards

    Arko

  • Order by clause

    Hello

    I want to know what it means when I use the "order by" clause with more than one column in both cases (sort order, it's the same, and when the sort order is different), for example

    What should happen when I do this

    1 Select * from table

    order by 1, 2; -both are a CSA

    2 - Select * from table

    order by 1 asc, desc 2;

    in both cases if it sorts the column with the first column without worrying, it is asc or desc, order another column order, because he should get

    related data in the first column, then another sort column does nothing?

    Am I wrong?

    Thank you

    SQL > select * from t by col1, col2 CSA CSA;

    COL1 COL2

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

    1                    1

    1                    2

    1                    3

    2                    1

    2                    2

    SQL > select * from t by CSA col1, col2 desc;

    COL1 COL2

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

    1                    3

    1                    2

    1                    1

    2                    2

    2                    1

Maybe you are looking for

  • HP Pavilion 500-311no: the hp Pavilion 500-311no upgrade

    Hp Pavilion 500-311no desktop PC, I bought a few years ago and now I feel like I would get some more power out of it then is it possible to upgrade this computer. I use mostly this pc for a game so what I'm looking to upgrade is the gpu. It seems tha

  • OfficeJet 6100 prints photos but print the electronic text as truncated including title, date/time?

    I have a HP 9300 and a HP 6100 printer. Both worked fine for a couple of years now. All of a sudden I'm experienceing random letters/characters whenever I try to print from email or occasionally on the web. If I take a document stored at random, they

  • Account live to be extinct?

    I received this email from: * address email is removed from the privacy *.  They said that this is an alert!  I think they are scamming and are looking for accounts.  It says my Live accountcloses in 48 hours if I do not give my name, e-mail, usernam

  • Only programs to run

    I would like to disable all programs on a machine with the exception of a few windows XP.I want to welcome it into the library and don't allow users to use the library catalogue. How could do us this under Windows?or do we need any third-party tool t

  • Cannot open the windows Vista calendar as it is prevented by a software restriction policy

    Disabled Windows Calendar never used, but was prevented from opening most of the programs, some are open but more not.get the message was prevented by the software restriction policy