Oracle 11g and partitions on a star model

Hello

I am Manager of the Business Intelligence service in a society. We use SAP BI4.1 SP3 and an Oracle 11 g server.

We have big questions about our various requests.

One of them is the use of "partition" and how they are used.

Here's the situation. I have a big fact with data on the inventory table. This table is partitioned with partition 1 per day, using the foreign key 'DATE_KEY"(digital YYYYMMDD)

I have a CIVIL dimension, whose primary key is also DATE_KEY (numeric YYYYMMDD). Other columns of attribute are like DAY (in a date format), YEAR, WEEK and so on. Very classic.

Now, I want to execute the following queries:

(1) to recover the 1 day stock, using the date format of my calendar dimension attribute

Select sum (stock_quantity)

of s FACT_STOCK

inner join DIM_CALENDAR d

On s.DATE_KEY = d.DATE_KEY

where d.DAY = to_date('16/02/2016','DD/MM/YYYY')

(2) get 1 day stock, using the primary key of my calendar dimension

Select sum (stock_quantity)

of s FACT_STOCK

inner join DIM_CALENDAR d

On s.DATE_KEY = d.DATE_KEY

where d.DATE_KEY = 20160216

(3) to recover the stock of 1 week, using the week of my calendar dimension attribute

Select sum (stock_quantity)

of s FACT_STOCK

inner join DIM_CALENDAR d

On s.DATE_KEY = d.DATE_KEY

where d.WEEK = 201607

Results of the explain plan command:

1)

expected: it's supposed to used 1 partition because the partition key is in the join

true: it does not use the partition. All the table partitions are analyzed.

2)

expected: it is supposed to used 1 partitionas the partition key is in the filter where

true: it uses a 1 partition.

3)

expected: it is supposed to use 7 partitionas the partition key is in the join

Real: it does not use the partition. All the table partitions are scanned.

The behavior is normal? I think that this isn't, but I'm not DBA.

"If it's normal, partition are completely unnecessary, since I can't say my professional user: 'Please use the technical dimension instead of the calendar attribute key' or 'Please list the day of your week instead of using the attribute of the week'"

Is it possible to implement dabase settings in order to use the partition.

Notice the: BF0000 used for pstart and pstop, also references to the "party join filter.

It is Oracle, creation and use of a filter of flowering of the first entry (small) to identify the partitions that need to access the second table.

It is possible for Bloom filters identify data redundant, but to identify the partition, they seem to be very accurate.

It seems that you should have a unique constraint on d.day for your first query, this would allow Oracle to see she had access only a single partition - and which could replace the filter of flowering with a subquery to pstart/pstop and KEY/KEY filter (possibly KEY (SQ) / KEY (SQ)) instead of: BFnnnn

Concerning

Jonathan Lewis

Tags: Database

Similar Questions

  • Oracle 11g and Fusion license

    Hi all

    We want to buy a licsense to the following.

    Oracle Database 11g R2.

    Fusion Middleware 11g Release 1 (11.1.1.7.0)

    WebLogic server 10.3.6

    Oracle Forms and reports 11g 2 (11.1.2.x)

    I have the following queries.

    1. What are the prices?

    2. how many license, we should buy for each?

    3. how much licnense for Oracle Forms and reports 11 g 2 (11.1.2.x).

    We have 10 developers who will develop the applications.

    4. all other guidelines?

    Kind regards.

    All prices and details of licenses how much you need, are on the Store of Oracle, http://shop.oracle.com

    If you want discounts, talk to a dealer! They are more likely to negotiate than Oracle (I know - I work for one).

    --

    John Watson

    Oracle Certified Master s/n

  • Oracle 11g and the APEX version

    Hello

    My understanding is that APEX 4.0 comes by default with Oracle 11 g. recently, we have the oracle 10 g updated to 11g and our admin has mentioned that APEX verision shows APEX 3.2.1...

    Please advice...

    Thank you

    No, you'll need to download and install 4.0.2 assuming you want the most recent apex.

  • Oracle 11g and Linux woes

    I'm trying to install and run the client Oracle 11 g for Linux on Ubuntu 10.04

    Now, I made these:

    sudo bash
    Groupadd oinstall
    Groupadd dba
    useradd oracle
    usermod-g oinstall-G - dba oracle
    passwd oracle
    mkdir OU1/Pei/app
    chown-r oracle.oinstall /uo1
    chmod-r 775 /uo1
    apt - get install do binutils gcc elfutils unixodbc pdksh sysstat
    mkdir/home/oracle
    chown-r oracle.oinstall/home/oracle
    xhost local: VMLINUX files
    Su - oracle
    DISPLAY =: 0.0; Export DISPLAY
    xclock # to check if the display works.
    *. / runInstaller *.

    I get the checklist of items that must be corrected, deleted, so I simply ignore and completion of the installation. But when I run a command in the installed folder, such as log/no sqlplus , sqlplus will not start.

    Why is this?


    Also, which version of Linux is supported by Oracle 11g?


    Thank you.

    ztech123 wrote:
    Guys,

    This is the error message:

    root@VBLinux: OU1 / / app/oracle/oraInventory # sqlplus
    sqlplus: command not found

    There is no updated database in place for the moment.

    Have you read and listen to the installation guide?

    Of course, as you know, Ubuntu is not a supported platform.

    That said, the error you report the OS shell informing you that there is no executable file called "sqlplus" is located in one of the directories listed in your PATH.

    Side comments:
    You should not install oracle as root.
    You should not run any utility oracle as root.
    You should not use root for any task at all who does not absolutely require it.

  • Oracle 11G and application server installed on the same server

    What are the advantages and disadvantages installation of Oracle 11 G database and Oracle (forms and reports) application server on the same server?

    Thank you in advance, Sonya

    Some people might want their data in an area of separate network for security reasons.
    It also depends on if it is the same people who do maintenance on db and appserver.

    It is at a lower cost with a single server and only 1 Os to implement.

  • Oracle 11g and then the database export import in oracle 10g

    Hello! There everyone...

    Please tell me the way to export the data and my data structures i.e. the comprehensive database of Oracle 11 g to the old version (oracle 10g) and how he import it...

    I move the database from one computer to another without lan, preferably via the storage device...

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28319/dp_overview.htm#CEGFCFFI

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28319/dp_export.htm#i1009711

  • Oracle 11g and 8i in a server

    Hello
    My direct application runs on the server with oracle 8i Database.
    Now, I installed 11g in the same server. We do not 11g for now. All services are disabled.

    The problem is that not, I can make a backup.
    backup, I do it manually.
    EXP
    user name:
    password:

    ORA-03134. connection to that server is no longer valid.

    Please help me to make a backup of database to 8i.

    Hello

    You must set some env variables - in your exportscript or set them manually:

    Set ORACLE_SID =
    set ORACLE_HOME =
    the PATH=%ORACLE_HOME\bin% value; C:\Windows\...

    CD \BIN

    \BIN\exp...

    HTH

    Oliver

  • How to create the new database in oracle 11g

    Hello
    I m new in oracle 11g, I downloaded oracle 11g and with the help of the guide of the developer-2 days, I learned all the SQL queries, but I worked with human resources database.
    Now, I want to create my own database with the required tables. Can anyone help me how I can make my own database in oracle 11g.

    Thank you
    Manna

    870692 wrote:
    Hello
    I m new in oracle 11g, I downloaded oracle 11g and with the help of the guide of the developer-2 days, I learned all the SQL queries, but I worked with human resources database.
    Now, I want to create my own database with the required tables. Can anyone help me how I can make my own database in oracle 11g.

    Thank you
    Manna

    Be sure to distinguish between the terms and the database schema. Other products, make them bad. It would be a HR diagram (or a user, which is the same in Oracle). If you do not need to use the database Wizard, unless you are working with a new host with no database.

    A simple way would be to get the DDL to create the HR schema and modify it for your own. It can be extracted from your database in several ways, or you can copy the hr_cre.sql to your own script and change. The two ways are educational, and you can google for instructions.

  • Installing Oracle 11g with ASM

    Hi all

    I'm new with oracle 11g and I want to create a database with ASM and I can't get there.
    Could someone tell me the step to make or send a link here?
    Fact the below steps
    1 - install the software oracle only
    2. install and configure grid infrastructure
    3. create the database with asm

    Thanks in advance

    Salvation;

    Please check the docs below for steps

    http://www.Oracle.com/technology/products/database/ASM/index.html
    http://www.Oracle-base.com/articles/11g/AsmEnhancements_11gR1.php
    http://www.pafumi.NET/RAC11g_and_ASM_on_VMware.PDF

    Respect of
    HELIOS

  • Oracle planning and budgeting Application model

    Hello

    I would like to know about this new feature of 11.1.2.4 - planning budgeting Application model and Oracle. Where can we get more details about this?

    I would like to start with a demo app DRM using Oracle planning and budgeting Application model.

    Thank you.

    You can find the application model planning-app - template.xml in the installation of DRM to the player: \Oracle\Middleware\EPMSystem11R1\products\DataRelationshipManagement\server\app-templates

    The integration of the PMCS provided by Oracle guide is useful, the Group let know if you have any other questions.

    Integration of Enterprise Performance Management Guide

  • How interrogate a user affected temp and tableapce default tablespace in oracle 11g?

    I have this SUNNY user on my DB. Now, I want to know how to query an affected user temp and tableapce default tablespace in oracle 11g?

    I tried Google, but no luck. can anyone help?

    Select the name of user, USER_USERS, temporary_tablespace from dba_users where username = "SUNNY";

    or

    Select the name of user, USER_USERS, temporary_tablespace from user_users where username = "SUNNY";

  • I am using oracle 11g express edition, how I can change the service name and the port number?

    I am using oracle 11g express edition, how I can change the service name and the port number?

    I am using oracle 11g express edition, how I can change the service name and the port number?

    What do you mean by "port number"? HTTP port (usually 8080), or listening port (normally 1521)?

    To change the name of the service, you can use (as a DBA or SYSDBA)

    SQL > alter system set service_name = '';

  • Oracle 11g with problem of pdf cocoon.war and glassfish?

    Hi all
    I m install oracle 11g express on CentOS OS, oracle apex earphone 1.1.2.131.15 5.6
    GlassFish v2 and cocoon 2.1.11 and connect to oracle apex glasfish works very well

    Problem start when I had cocoon xml build and deploy cocoon.war on glassfish,
    addition of fop_post on cocoon/fop_post (as described on http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html) but the pdf don't work!

    (I've been putting all the steps on the machine of 11.2 to 32-bit suse and ubuntu 8.04 - 32 bytes and pdf open work well)
    Y at - he no idea what happen whith this pdf error?
    Is the problem with 64 bytes some specific parameters, with java jdk, Cocoon, glassfish, or something on apex of oracle 11g?

    Gordan

    Published by: useruseruser on June 20, 2011 21:49

    Hi Gordon,.

    Once again, great to hear that!
    Could you rent close this thread and mark any post useful or correct if your question is answered?

    Thank you

    Udo

  • Problem with Oracle 9i and Oracle 11g

    Hello
    I have 2 Installation of Oracle: Oracle 9i client and Server Oracle 11.2
    Oracle 9i to: C:\oraclient9\
    Oracle 11g: C:\app\a.l\product\11.2.0\

    I have an application that has to connect to Oracle via ODBC, but whenever I try to connect looking for odbc Oracle 9i and I get this error:
    ORA-12541: TNS no listener

    If I try to boot with sqlplus to: start-> run-> sqlplusw get Oracle 9i version

    If I'm running sqlplus from start-> program-> Oracle 11-> I can connect properly.

    If I try to create a new ODBC it always plug the Oracle version 9i.

    I tried:
    Set ORACLE_HOME=C:\app\a.l\product\11.2.0\dbhome_1
    Set ORACLE_SID = ORCL

    but when I try: sqlplus / as sysdba I get this error:
    14 error initializing SQL * more
    SP1 file < lang > .msb not found message
    SP2-0750: you may need to set ORACLE_HOME in your Oracle software directory

    If I try to boot with sqlplus to: start-> run-> sqlplusw get Oracle 9i version with the error:
    ORA-12541: TNS no listener

    Variables environment variables in the path are:
    C:\oraclient9\bin; C:\Program Files\Oracle\jre\1.3.1\bin; C:\Program Files\Oracle\jre\1.1.8\bin; C:\app\a.l\product\11.2.0\dbhome_1\BIN; C:\app\a.l\product\11.2.0\dbhome_1\bin;%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\WindowsPowerShell\v1.0\; C:\Program Files\Sybase\SQL Anywhere 9\win32. C:\Program Files\Sybase\Shared\win32; C:\Program Files\Sybase\SQL Anywhere 9\drivers; C:\Program Files\Sybase\Shared\Sybase 4.2 Central; c:\Program Files\Microsoft SQL Server\90\Tools\binn\; C:\Progra~1\XRay



    tnsnames 11g:
    # tnsnames.ora Network Configuration File: C:\app\a.l\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    LISTENER_ORCL =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    
    
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
        )
      )
    
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl.domopenplan.local)
        )
      )
    tnsnames 9i:
    # TNSNAMES.ORA Network Configuration File: C:\oraclient9\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    ORCL.DOMOPENPLAN.LOCAL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl.domopenplan.local)
        )
      )
    11g listener.ora:
    # listener.ora Network Configuration File: C:\app\a.l\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:\app\a.l\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:\app\a.l\product\11.2.0\dbhome_1\bin\oraclr11.dll")
        )
        (SID_DESC =
          (GLOBAL_DBNAME = orcl.domopenplan.local)
          (SID_NAME = orcl.domopenplan.local)
          (ORACLE_HOME = C:\app\a.l\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:\app\a.l\product\11.2.0\dbhome_1\bin\oraclr11.dll")
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.103)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = C:\app\a.l
    Do you have any idea how I can create a new ODBC to connect to Oracle 11g?

    Thanks in advance!

    opening for the system control window Server DB & question OS command sequence

    lsnrctl status
    set
    lsnrctl service

    COPY orders & results then PASTE all come back here

  • Upgrade 9i to 11g w / AQ and partitioning

    Hi all

    We will make an upgrade for a client, 9.2.0.6 on Solaris 11 GR 2 on AIX 6.1. I read that the documentation for upgrade and the best (only?) way would be to an exp/IMP. There are only about 30-40 GB of data, so the downtime should not be too suddenly.

    My main concern is that the database uses AQ and partitioning. For export/import of partitioning should be able to carry it through, but for the QA part, should there be something else I should do in advance, or as long as I export/import objects QA owner then it should be ok?

    Edit:
    In addition, when you apply the patches, the order would be:
    -Install 11 GR 2
    -Create the database
    -Apply the power supply
    -Apply the CPU
    -Import data?

    Any help would be appreciated.

    Thank you

    Published by: oscrub on August 8, 2010 04:21

    I am agree with Dan - using dbua would be cleaner and simpler. You must first upgrade to 9.2.0.8 (which is also not too hard) before attempting to upgrade to 11 GR 2. See - http://download.oracle.com/docs/cd/E11882_01/server.112/e10819/preup.htm#i1007814

    >
    ...
    -Apply the power supply
    -Apply the CPU
    ...
    >

    PL do not forget that you must apply processors or the power supply - you cannot apply both. See Section 8 of the MOS Doc 854428.1 (Patch updates Set to day for Oracle products)

    HTH
    Srini

Maybe you are looking for

  • I installed windows 8.1 using bootcamp, but he is not seen as a startup option

    I installed windows 8.1 using bootcamp, but it does not appear anywhere. When I return to bootcamp to try again at a standstill, he asked me to remove the existing installation. I downloaded the required software from apple and the installation from

  • K1 abandoned? Anyone know?

    I try to get a new K1, the motherboard has been replaced and now it does the same thing again, circles of Lenovo and Nvidia Tegra display green, allows to switch between the two logos. I am told the K1 is interrupted and the retailer will not get mor

  • I'm not able to get the sound card drivers for a sony VAIO desktop computer

    I'm not able to get the audio drivers for a sony VAIO desktopPCV 2253 someone can help me get t for free

  • Bluetooth always appears offline

    After I successfully pair my cell phone on my desk via bluetooth... without music (in my case) is broadcast through speakers of the offices... I'll check on the device and it says it is 'offline '... I have paired and unpaired the phone to the PC on

  • Question of honestech TVR 2.5 NO SOUND on Windows 7 desktop pc

    I installed Honestech TVR 2.5.on WINDOWS XP SP3, it works perfectly, but now I upgraded my windows XP to WINDOWS 7 32 bit. but now I'm having a problem in this software, it shows that video but giving no AUDIO output. driver is install perfectly but