Select  from partition, will it work ?

Hi, I have a partiotined TT_table:
CREATE TABLE RYBATEMP.T_STAT
( ACTDATE DATE,
COL_LIST, FORMAT_LIST..
TABLESPACE "RYBA_DATA" PARTITION BY RANGE
("ACTDATE" )
( PARTITION "D_20100901" VALUES LESS THAN (TO_DATE(' 2010-09-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) ....
I just want somehow to check that the following select will directly refer to wanted partition as expected not browsing thru whole table:
SELECT COL_LIST FROM T_STAT WHERE
ACTDATE >= to_date('01-SEP-10 00:00:00','DD-Mon-YY HH24:MI:SS') AND
ACTDATE <= to_date('01-SEP-10 21:01:16','DD-Mon-YY HH24:MI:SS')
This time on date parameter confuses me, even after reading thru defintionis where partition difined with HH:MI:SS format. Is there anay way to track it in Plan or something, never did it on Oracle.
Will it take greater/less/ signs ?
Thanks
Trent

Hi Trent,
Yes you will be able how things work with partitions in the explain plans.
I don't know your version but a few explanations in 9.2 for example :
http://download.oracle.com/docs/cd/B10500_01/server.920/a96533/ex_plan.htm#7211
If you want to know how to have complete trace etc. (example in 10.2) :
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm
(notice partitioning does not avoid the need of indexes)
Best regards
Phil

Similar Messages

  • Select * from tab is not working in oracle 10g

    select * from tab is not working in oracle 10g. But at the same time,
    select * from <<table>> is working.
    Please advise me.

    This works for me in 10.2.0.2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from tab;
    TNAME                          TABTYPE            CLUSTERID
    LOAN_DETAIL                    TABLE
    PLAN_TABLE                     TABLE
    ...

  • I want to buy a factory unlocked iphone 4s from US ,will it work in india ?

    i want to buy a factory unlocked iphone 4s from US ,will it work in india

    Unlocked iPhone 4S's are not yet generally available at retail in the U.S. Currently, the only official way to get one is order from the US online Apple store. This will require a US credit card with a valid US billing/shipping address.

  • Does anyone know if movies I purchase from itunes will also work on an android device that supports mp4?

    Does anyone know if movies I purchase from itunes will also work on an android device that supports mp4?

    They will not. 
    They ONLY work on itunes/apple devices.

  • Iphone 5 unlocked from dubai will it work in india

    iphone 5 unlocked from dubai will it work in india

    If officially unlocked, yes. Be careful, many of the electronics stores there sell hacked iPhones. All iPhones, from official sources in Dubai, have had FaceTime permanently removed...required by law, with no way to add it back. So, if you want FaceTime, don't purchase there.

  • When i buy a ipad mini from verizon will it work in india

    when i buy a ipad mini from verizon will it work in india

    BobTheFisherman, thank you
    I'm grateful that you helped me with understanding it. Now I get it.
    Dah•veed, with all due respect,
    What I asked about is the same thing ahmedsamiul707 asked about. I just wanted to know something more about the same thing. When you read the forum, you can see many threads which are exactly the same. Why add another thread if you have the same question? Only wanted an explanation. Was that so hard?
    So to make it clear - as BobTheFisherman provided - all iPads are unlocked.

  • Hi , I am planning to buy i phone 6 from japan , will it work in UK.

    Hi , I am planning to buy i phone 6 from japan , will it work in UK.

    hello gautam
    yes. it will work in the UK.
    be sure to buy the iPhone 6 or 6 Plus, and buy it an apple store in Japan (do NOT buy it at a network service provider), and when you buy it be sure to tell the salesperson that you want the SIM free version.
    if do the above, then the phone will work in the UK.
    here are the frequency/band specs (taken from the apple Japan website). as you can see, all major LTE bands are available on this phone.
    UMTS/HSPA+/DC-HSDPA(850、900、1,700/2,100、1,900、2,100MHz)
    GSM/EDGE(850、900、1,800、1,900MHz)
    LTE(バンド1、2、3、4、5、7、8、13、17、18、19、20、25、26、28、29)

  • HT1937 I want buy iphone5 from singapore , will it work in india properly??

    I want buy iphone5 from singapore , will it work in india properly??

    What does this have to do with using an iPhone in an Enterprise environment?

  • Selecting from partition is taking too much time

    The SEARCH_MEMBE_PROVIDER_ROLLUP is partitioned with range-list partition
    ROLLUP_ID --range (about 30 partitions ) and other column with list subpartitioned (about 48)
    *indexes on columns
    b-tree global index on ROLLUP_ID
    bitmap local index on ROLLUP_ID, MEMBERONE_ID_1010
    bitmap local index on MEMBERONE_ID_1010*
    I could not figured it out as some partition's data is coming fast and some partition's data is not coming at all(taking 18 minutes)
    any help would be greatly appreciated and please let me know if need more information
    Please see the following information
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> explain plan for SELECT COUNT (1)
      2  FROM (SELECT LY.MEMBERONE_ID_1010
      3          FROM (SELECT *
      4                  FROM (SELECT dr.*
      5                          FROM MEMBERONE_last1year dr)) ly
      6         WHERE 1 = 1
      7               AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
      8                                              FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
      9                                             WHERE RP.rollup_id = 7));
    Explained.
    SQL> @utlxplp
    PLAN_TABLE_OUTPUT
    Plan hash value: 677376773
    | Id  | Operation                       | Name                           | Rows  | Bytes | Cost  | Pstart| Pstop |
    |   0 | SELECT STATEMENT                |                                |     1 |    18 |    84 |       |       |
    |   1 |  SORT AGGREGATE                 |                                |     1 |    18 |       |       |       |
    |   2 |   NESTED LOOPS SEMI             |                                |   154K|  2707K|    84 |       |       |
    |   3 |    INDEX FULL SCAN              | IX1_MEMBERONE_LAST1YEAR        |  2701K|    20M|    75 |       |       |
    |   4 |    PARTITION RANGE SINGLE       |                                | 64749 |   632K|    84 |     7 |     7 |
    |   5 |     PARTITION LIST ALL          |                                | 64749 |   632K|    84 |     1 |    48 |
    |   6 |      BITMAP CONVERSION TO ROWIDS|                                | 64749 |   632K|    84 |       |       |
    |*  7 |       BITMAP INDEX SINGLE VALUE | IX3_SEARCH_MEMBE_PROVIDER_ROLL |       |       |       |   289 |   336 |
    Predicate Information (identified by operation id):
       7 - access("RP"."ROLLUP_ID"=7 AND "DR"."MEMBERONE_ID_1010"="RP"."MEMBERONE_ID_1010")
    Note
       - cpu costing is off (consider enabling it)
    23 rows selected.
    *THE ABOVE QUERY is taking more than 18 minutes*
    ========================
    *THE BELOW QUERY is taking not even two seconds*
    SQL> SELECT COUNT (1)
      2  FROM (SELECT LY.MEMBERONE_ID_1010
      3          FROM (SELECT *
      4                  FROM (SELECT dr.*
      5                          FROM MEMBERONE_last1year dr)) ly
      6         WHERE 1 = 1
      7               AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
      8                                              FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
      9                                             WHERE RP.rollup_id = 11));
      COUNT(1)
        131575
    Elapsed: 00:00:01.53
    SQL> explain plan for SELECT COUNT (1)
      2  FROM (SELECT LY.MEMBERONE_ID_1010
      3          FROM (SELECT *
      4                  FROM (SELECT dr.*
      5                          FROM MEMBERONE_last1year dr)) ly
      6         WHERE 1 = 1
      7               AND LY.MEMBERONE_ID_1010 IN (SELECT RP.MEMBERONE_ID_1010
      8                                              FROM SEARCH_MEMBE_PROVIDER_ROLLUP RP
      9                                             WHERE RP.rollup_id = 11));
    Explained.
    Elapsed: 00:00:00.03
    SQL> @utlxplp
    PLAN_TABLE_OUTPUT
    Plan hash value: 3092271485
    | Id  | Operation                 | Name                         | Rows  | Bytes | Cost  | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |
    |   0 | SELECT STATEMENT          |                              |     1 |    18 |    80 |       |       |        |      |            |
    |   1 |  SORT AGGREGATE           |                              |     1 |    18 |       |       |       |        |      |            |
    |   2 |   PX COORDINATOR          |                              |       |       |       |       |       |        |      |            |
    |   3 |    PX SEND QC (RANDOM)    | :TQ10002                     |     1 |    18 |       |       |       |  Q1,02 | P->S | QC (RAND)  |
    |   4 |     SORT AGGREGATE        |                              |     1 |    18 |       |       |       |  Q1,02 | PCWP |            |
    |*  5 |      HASH JOIN RIGHT SEMI |                              | 70780 |  1244K|    80 |       |       |  Q1,02 | PCWP |            |
    |   6 |       PX RECEIVE          |                              |   208K|  2034K|     6 |       |       |  Q1,02 | PCWP |            |
    |   7 |        PX SEND HASH       | :TQ10001                     |   208K|  2034K|     6 |       |       |  Q1,01 | P->P | HASH       |
    |   8 |         PX BLOCK ITERATOR |                              |   208K|  2034K|     6 |     1 |    48 |  Q1,01 | PCWC |            |
    |*  9 |          TABLE ACCESS FULL| SEARCH_MEMBE_PROVIDER_ROLLUP |   208K|  2034K|     6 |   481 |   528 |  Q1,01 | PCWP |            |
    |  10 |       BUFFER SORT         |                              |       |       |       |       |       |  Q1,02 | PCWC |            |
    |  11 |        PX RECEIVE         |                              |  2701K|    20M|    75 |       |       |  Q1,02 | PCWP |            |
    |  12 |         PX SEND HASH      | :TQ10000                     |  2701K|    20M|    75 |       |       |        | S->P | HASH       |
    |  13 |          INDEX FULL SCAN  | IX1_MEMBERONE_LAST1YEAR      |  2701K|    20M|    75 |       |       |        |      |            |
    Predicate Information (identified by operation id):
       5 - access("DR"."MEMBERONE_ID_1010"="RP"."MEMBERONE_ID_1010")
       9 - filter("RP"."ROLLUP_ID"=11)
    Note
       - cpu costing is off (consider enabling it)
    30 rows selected.
    Elapsed: 00:00:00.54
    SQL> spool offthanks again

    Hi
    1) there are two major differences between the plans: serial vs parallel and NESTED LOOPS SEMI vs HASH JOIN SEMI
    2) NESTED LOOPS look like a bad choice here, and it also looks like the optimizer badly underestimates it's real cost. Which is a bit odd, because it knows that the outer rowsource has 2701K, i.e. the inner operation would have to be executed 2701K times. Looks like an optimizer glitch, which brings us to the point that Dan has already raised here: you shouldn't be running on an old unsupported version
    3) regarding serial vs parallel: it could be due to difference in session settings (ALTER SESSION ENABLE/DISABLE PARALLEL QUERY)
    4) the two plans have different values of the filter against rollup_id (7 vs 11), so one possible reason for different behavior is the histogram on SEARCH_MEMBE_PROVIDER_ROLLUP.rollup_id. If you can reproduce the issue on a test database, re-gather stats on this table without histograms (method_opt=>'for all columns size 1', no_invalidate=>false) and see if the problem goes away
    Best regards,
    Nikolay

  • Select from partition problem

    hi all,
    hope i'm in the right forum. i have 2 databases sitting in 2 separate machines. 1 installed with Oracle 9i and 1 with Oracle 10g. I'm trying to select a partitioned table in 9i remotely (from the 10g db). In order to do that, I've created a synonym in 10g pointing to the partitioned table in 9i.
    In 9i, if i do a select "select count(*) from tableA partition (p1)", i'm able to grab the correct count of the partition. But when i use the same select statement in 10g, it's grabbing all the data of the table, sum of all partitions. it looks like the partition qualifier specified in the select statement has no effect. Can i know what is the problem? hope to get some response a.s.a.p. tq
    regards,
    ykl

    I did recreate your same situation, and actually the result is the same. I get that result when using a synonym. If I use <table name>@<db link> instead of synonym, then the result is different :
    ORA-14100: partition extended table name cannot refer to a remote object
    (internal unpublished bug 3076633, fixed in 10.2)
    In my case I can solve the problem using partition key, instead of partition name, that is
    SQL> select count(*) from <partition table synonym> where <partition key> = <value>;
    instead of
    SQL> select count(*) from <partition table synonym> partition(<partition name>);
    Paul

  • If i buy an iphone4 from USA, will it work in Australia?

    Will it work in Australia?

    If you want to buy an iPhone in the US and use it in other countries, you MUST buy an unlocked iPhone from the Apple store.
    Keep in mind that warranty is country specific.  Unless you're just getting a heck of a deal because of the currency exchange rate, you are better off buying one in the country you intend to use it in.

  • Apple tv bought from singapore, will it work in india ?

    I am planning to buy apple tv from singapore. I need to know will it work in india n will it need any unlock to done ?

    Welcome to the Apple Community.
    You may need to change the plug but it will work just fine. Some features may be different because of the differences between the iTunes store in each location.

  • If i buy an iphone 5s from usa,will it work in turkey?

    Hi everyone,i want to buy an iphone 5s from usa but i am having doubts.If i buy it from an apple store,will it work in turkey?

    You will get 3G coveragae but LTE will most likely NOT work. Also, the warranty will not be valid in Turkey. Should the phone develop any issues you will have to take the phone back to the US for service.

  • If I buy an Iphone 5 from america will it work in the UK?

    Hi guys I was just wondering if anyone knows that If i purchase an Iphone 5 from America, Pittsburgh will it work in the UK?

    LTE will not work at all in Europe ,wrong bands with any European carriers
    Warranty is not international ....valid in USA only
    Current prices are for a subsidised 24 month contract ,no unlocked iPhone 5 available yet in USA .
    UK prices are unlocked tax inc US prices are before sales Tax
    You may get caught at customs ...VAT + duty as iPhone is over personal Allowance
    Generally not a good idea
    The UK version is A1429 GSM not available in US

  • I brought iphone 5 unlocked from dubai will it work in india

    i brought iphone 5 unlocked will it work in india

    If it is truly unlocked and uses the same bandwidth/frequencies/
    protocols as your Indian wireless provider, then most features
    should work.
    If the iPhone has previously been hacked/modified/jailbroken,
    it may not work or even be restoreable.
    Warranty is valid only in country of original purchase, which may
    not have been Dubai.

Maybe you are looking for

  • How do I hook up a monitor?

    I want to hook up a small 13" analog NTSC monitor to my Dual 2Ghz G5. I looked at vthe back of it and i cant figure out how to connect it. And when I connect it, how do I tell FCP to output to it as well as my computer monitor??

  • HT204406 When synching my music to iTunes Match, iTunes either crashes or I get an unknown error (code 8104).

    I continously get this problem and have been trying again and again, but always with the same result.  It seems that most of the time, iTunes Match goes through the first 2 steps (Step 1: Gathering information and Step 2: Matching music) but when it

  • How Can I Kill Excel.exe Process After finish my Execution of SSIS Package in Sqlserver2008r2

    Hi !,       am new for c# and SSIS Package Creation , I am Trying to Read Excel file, and load the value into Sqlserver using SSIS package . My Problem is , After Execution of SSIS package Still Running EXCEL.exe Process in my server. i need to kill

  • Missing plug in for Safari.

    Two weeks ago safari just stopped showing parts of my automobilemag, caranddriver, motortrend and roadandtrack web pages. Says that I am missing a plug in. Tried to update my version of adobe software and eventually removed it and reinstalled and sti

  • TOAST TITANIUM & iMOVIE

    I CANNOT save a disc image by saving my large video files (21+ GB) using iDVD. It will not allow me to use it (iDVD). Is there a way I can burn such large volumes as a disc image and then burn to DVD with the computer requesting new DVD being inserte