query running too long on a partitioned table

Hello
I try to run the following query on a table of line 73 million, but the application continues running and works without any results back within a reasonable time.

Select *.
of svcdepot.service_log l
where dbms_lob.instr (l.service_log, 'SALESFORCE_ROLE_CREATED') > 0 and rownum < 2
and create_date > sysdate-.1

This table has a normal index on the create_date table and is also divided on create_date. Partition names as PARTITION20120316 and PARTITION20120311. It shows values lower than TIMESTAMP' 2012 - 03 - 16 00:00:00 'and TIMESTAMP' 2012-03-11 00:00:00 ', respectively. Is could someone please tell me how I can change the query so that it does not forever? He seems to fight the create_date column (while I was troubleshooting). I just need one record with this SALESFORCE_ROLE_CREATED text in this clob column.

Thank you!

Hello

It would be helpful if you mentioned the name of the partition in the query. For example, for superior to sysdate create_date-. 1, you don't need to go through the full table and only the partition created for today would be sufficiient.
for example
Select *.
svcdepot.service_log PARTITION (PARTITION20120312) l
where dbms_lob.instr (l.service_log, 'SALESFORCE_ROLE_CREATED') > 0 and rownum<>
and create_date > sysdate-.1
If you use this query in PL/SQL program, you will need to create this dynamic partition name and dynamic SQL can be used.

Tags: Database

Similar Questions

  • Data dictionary query takes too long.

    Hello
    I'm using ORACLE DATABASE 11 g.

    The following query takes too long to run and not give the result. As I've tried a few tricks SQL Oracle but it forces developed.
    SELECT 
    distinct B.TABLE_NAME, 'Y' 
      FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
     WHERE A.INDEX_NAME = B.INDEX_NAME
       AND A.PARTITION_NAME = C.PARTITION_NAME
       AND C.STATUS = 'UNUSABLE'
        OR A.STATUS = 'UNUSABLE'
        OR B.STATUS = 'INVALID';
    Please guide me what to do? to run this query in a fast paced mode...


    Thanks in advance...

    Your query is incorrect. It returns all tables if A.STATUS = "UNUSABLE" or B.STATUS = "INVALID". Most likely, you meant:

    SELECT
    distinct B.TABLE_NAME, 'Y'
      FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
     WHERE A.INDEX_NAME = B.INDEX_NAME
       AND A.PARTITION_NAME = C.PARTITION_NAME
       AND (C.STATUS = 'UNUSABLE'
        OR A.STATUS = 'UNUSABLE'
        OR B.STATUS = 'INVALID');
    

    But the above will return sous-partitionnee tables not valid/no usable index. He ain't no non-sous-partitioned tables partitioned index/index not valid/not usable with same partitions in the form of tables not partitioned with valid/no unusable indexes. If you want to get any table with indexes not valid/not usable, you outer join that's going to hurt even more performance. I suggest you use the UNION:

    SELECT  DISTINCT TABLE_NAME,
                     'Y'
      FROM  (
              SELECT INDEX_NAME,'Y' FROM USER_INDEXES WHERE STATUS = 'INVALID'
             UNION ALL
              SELECT INDEX_NAME,'Y' FROM USER_IND_PARTITIONS WHERE STATUS = 'UNUSABLE'
             UNION ALL
              SELECT INDEX_NAME,'Y' FROM USER_IND_SUBPARTITIONS WHERE STATUS = 'UNUSABLE'
            ) A,
            USER_INDEXES B
      WHERE A.INDEX_NAME = B.INDEX_NAME
    /
    

    SY.

  • query takes too long

    Hello

    The following query takes too long (more than 30 minutes), work with 11g.
    The table has three columns RID, ida, geometry and index has been created on all of the columns.
    The table has about 5,40,000 documents of point geometries.

    Please help me with your suggestions. I want to select the geometry in double point where ida = STRING.


    SQL > select a.rid, b.rid from totalrecords, totalrecords b where a.ida = 'CORD' and b.idat = 'CORD' and
    sdo_equal (a.geometry, b.geometry) = 'TRUE' and a.rid! = b.rid order of 1,2;

    concerning

    Hello

    Just glad it helped, don't forget to award points ;-).

    The SDO_JOIN will use the spatial index for a spatial comparison.
    First of all, it will use the index to check which geometries MBR interact, it is the primary filter: http://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_intro.htm#g1000087

    Secondly, you should apply a space MASK, pair of geometries that comes out of the primary filter is then compared according to the MASK, MASK for example = EQUAL, will check these pair of geoms are equal.

    Now, because you have points, the members are the points themselves, so that if their MBR interact, points to interact, which means they are equal.
    This means that the result of the SDO_JOIN points, in this case even a self-join, will give you all the points that are equal.

    But as points are also equal in their car, the join join reflexive sdo, will give you: a = b & one = one but also a b.
    To this effect, you set the a.rowid< b.rowid,="" to="" avoid="" a="a" but="" also="" b="">

    I hope this explains it a little, again read and read great literature (early!), will have a better understanding.

    Good luck

    Luke

  • MDCT - problem installing sample report - runs too long but no progress

    Hello

    As part of the configuration of the MDCT environment for practice, we managed facility that follows:

    * Supported Enterprise Linux
    * Oracle DB 11 g R2 (option OLAP and mining)
    * OWB was already installed as part of DB Oracle 11 GR 2 - just unlocked the OWB accounts.
    * Installed OBIEE 11 g R2 installation - Installation successful and able to open URLs. (Analytics and BI Publisher etc.) -Deliver the login account.
    * Installation of the Communication data model (the first Installation of the MDCT Installer type)

    When we try to install Sample Reports at the same stage of the screen remain open and runs too long but no progress.
    The installation process of the sample reports MDCT is given in the doc attached with screenshot and the log file is also included in the attached document.

    Please let us know the issue of the following two:

    (1) how to connect to Analytics after OBIEE 11 GR 2 installed on Linux - (in our case, we use the user as an administrator and tried the password same as username, even checked the user weblogic and another, but without success. Please provide us with information that give details (document) on the Administartion of OBIEE 11 g 2 on Linux).

    (2) the problem with the installation of well successful installation MDCT Sampple reports MDCT of the data model. (First Type of Installation of the MDCT Installer)


    Thank you and best regards,
    Amol Tremblay

    ...............................................................................................

    I think, I can not attach the file here and characters maximum is 30 k for the post here then put below the few lines of the contents of the log file:
    I can send an email screen plans docs and the full logfile on request if necessary.

    Stuck in the screen Configuration support-
    After more than an hour, the same screen - no progress - I tried 3 times but the same problem. Also do not log file growth and seems its expectation of something dependent which must occur prior to this.

    = launch a few lines of the log file =.


    The oraparam.ini file could not be found at /u01/app/oracle/product/11.1.0/db_1/oui/bin/oraparam.ini
    ParamFile using: /u01/app/oracle/product/11.1.0/db_1/oui/oraparam.ini


    Check the swap space: must be greater than 500 MB. Real 1027 MB passed
    Monitor: must be configured to display at least 256 colors. 65536 real past


    The number of files to the jre is 689.

    The number of files to the Yes is 77.
    Using the value of umask 022 ' available from oraparam.ini



    = end of lines in the log file =.

    INFO: Copy Aggr XML for: Oracle Communications data model
    NEWS: The Top level Aggreage file = /u01/app/oracle/product/11.1.0/db_1/inventory/ContentsXML/ConfigXML/oracle.ocdm.11_2_3_0_0.xml
    INFO: removed all files of the required instance
    INFO: OUI_CAPlugIn is not found in XML
    NEWS: cf session will be created for OH: /u01/app/oracle/product/11.1.0/db_1/ TLAggr: oracle.ocdm instancePath: ContentsXML/inventory/ConfigXML.
    INFO: session of cf Oh: /u01/app/oracle/product/11.1.0/db_1/ TL Aggr: [oracle.ocdm] instancePath: inventory/ContentsXML/ConfigXML.
    INFO: length aggr Ref: 2
    NEWS: cf session hashcode: 22855989
    NEWS: cf session recorded with key: OraDb11g_home1 oracle.ocdm
    INFO: cf session is ok
    INFO: created and saved the FC session for oh: OraDb11g_home1
    INFO: passing params to cf
    INFO: Managing the storage of variables for aggr name oracle.ocdm
    INFO: This variable sl_ASMSelectableDiskGroups is not added to the map of global context
    INFO: This variable s_scratchPath is not added to the map of global context
    INFO: tools to run exitonly spent: 0
    INFO: Begin to run the configuration wizards
    INFO: Command = oracle.ocdm.OCDMCfgPlugIn /u01/app/oracle/product/11.1.0/db_1/ocdm/ocdm_install.sh ${s_dbSysPasswd}

    OCDMCfgPlugIn: Starting configuration MDCT...
    OCDMCfgPlugIn: Configuration MDCT initialized, pending response from the script...
    OCDMCfgPlugIn: Receive the SYSTEM password...
    OCDMCfgPlugIn: Passing the credentials SYSTEM configuration script...
    OCDMCfgPlugIn: Identification information SYSTEM passed to the configuration script.
    OCDMCfgPlugIn: SYSTEM password received.
    OCDMCfgPlugIn: Initialization of config settings...

    OCDMCfgPlugIn: Creating the journal folder...
    OCDMCfgPlugIn: MDCT log folder exist
    OCDMCfgPlugIn: Export config approx...
    OCDMCfgPlugIn: An audit of OWB...

    OCDMCfgPlugIn: Installing OWB...

    OCDMCfgPlugIn: WARNING: OWB OWNER already exists.

    OCDMCfgPlugIn: Archive: /u01/app/oracle/product/11.1.0/db_1/ocdm/pdm/relational/sample_schema/ocdm_sample.dmp.zip

    OCDMCfgPlugIn: inflate: /u01/app/oracle/product/11.1.0/db_1/ocdm/install_tmp/ocdm_sample.dmp
    OCDMCfgPlugIn: 2011_02_28_11_24_30 10% complete
    OCDMCfgPlugIn: Import of the MDCT sample schema

    ==================end of log File ========================================

    Hi Please check my answers
    (1) how to connect to Analytics after OBIEE 11 GR 2 installed on Linux - (in our case, we use the user as an administrator and tried the password same as username, even checked the user weblogic and another, but without success. Please provide us with information that give details (document) on the Administartion of OBIEE 11 g 2 on Linux).
    The current version of MDCT does not support BIEE 11 g, so you must install BIEE 10 g. In the next version (available soon), MDCT will support BIEE 11g.

    (2) the problem with the installation of well successful installation MDCT Sampple reports MDCT of the data model. (First Type of Installation of the MDCT Installer)
    Import will take a long time, you can connect to the database with ocdm_sample_sys/ocdm_sample_sys and use "select count (*) from tabs;" to monitor the import process.

  • What query takes too long

    How can you know which application takes too long to run in a database? and most of the resources consumption?

    user3636719 wrote:
    How can you know which application takes too long to run in a database? and most of the resources consumption?

    Try to use the following text:

    SELECT * FROM
    (SELECT
    sql_fulltext,
    sql_id,
    child_number,
    disk_reads,
    executions,
    first_load_time,
    last_load_time
    V $ sql
    ORDER BY DESC elapsed_time)
    WHERE ROWNUM<>
    ;

    Also, try the v$ session_longops querying:

    Select * from)
    Select the target, sofar, less, totalwork.
    units, elapsed_seconds, message
    from v$ session_longops by start_time desc)
    where rownum<>

    Kind regards
    Rizwan Wangde
    SR Oracle DBA.
    http://Rizwan-DBA.blogspot.com

  • How to stop the query takes too long

    Is there a way to tell oracle to stop a query that takes too long to run?

    I'm trying to end a way to prevent some users from running any querys that takes more than 2 minutes... any help?

    I use 10g

    Thank you!

    Hello

    You can create a profile... and limit...

    CREATE a PROFILE prof_low LIMIT
    CPU_PER_CALL 3000 (about 30 seconds)
    PRIVATE_SGA 500K
    LOGICAL_READS_PER_CALL 1000;

    ALTER USER myuser PROFILE prof_low;

    Concerning
    Joao Oliveira

  • * ORA-00972: identifier is too long * when drop index table app

    Hello

    I had some difficulties with dropApplicationTableIndex. He raised an exception ORA-00972:
    java.sql.SQLException: ORA-00972: identifier is too long

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:961)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
    at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1657)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1626)
    at oracle.spatial.rdf.client.jena.Oracle.executeUpdate(Oracle.java:769)
    at oracle.spatial.rdf.client.jena.GraphOracleSem.dropApplicationTableIndex(GraphOracleSem.java:3695)


    However, the longer name of my models is 23 characters, making it the longest name of characters 27A table (+ _TPL).
    Is there a still shorter limit for the length of model name?

    Thank you

    Kind regards
    Julien

    Hi Julien,

    In fact, the limit for a semantic model, created using the Jena adaptor is 19 characters. This is because the application table index uses TRIPLEIDX as a suffix.

    Best,
    Vlad

  • SQL query takes too long to run (1 h 25 min)... pls help how to set up the query.

    Hello

    Could someone please help how to tune the query as its takes a long time to retrieve the results.

    Select

    col1,

    col2,

    col3,

    COL4,

    col5,

    col6,

    col7,

    COL8,

    col9,

    col10,

    Col11,

    col12,

    Sum (volume1),

    Sum (volume2),

    Sum (volume3),

    Sum (volume4),

    Sum (volume5),

    Sum (volume6),

    Sum (volume7),

    Sum (volume8),

    Sum (volume9),

    Sum (volume10),

    Sum (volume11),

    Sum (volume12),

    Sum (volume13),

    Sum (volume14),

    Sum (volume15),

    Sum (volume16),

    Sum (volume17),

    Sum (Volume18),

    Sum (volume19),

    Sum (volume20),

    Sum (rate1),

    Sum (rate2),

    Sum (rate3),

    Sum (rate4),

    Sum (rate5),

    Sum (rate6),

    Sum (rate7),

    Sum (rate8),

    Sum (rate9),

    Sum (rate10),

    Sum (rate11),

    Sum (rate12),

    Sum (rate13),

    Sum (rate14),

    Sum (rate15),

    Sum (rate16),

    Sum (rate17),

    Sum (rate18)

    Sum (rate19),

    Sum (rate20)

    Of

    Table 1 - 13, 25, 99, 400 records

    Table2 - 13, 45, 1000 records

    Table 3 - 4, 50, 000 records

    Table 4 - 1,00,000 records

    table5 - 30 000 records

    where tabl1.col1 = table2.col2,

    Table1.Col1 = table3.col1.

    table2.col2 = table3.col2...

    Group

    Sum (volume1),

    Sum (volume2),

    Sum (volume3),

    Sum (volume4),

    Sum (volume5),

    Sum (volume6),

    Sum (volume7),

    Sum (volume8),

    Sum (volume9),

    Sum (volume10),

    Sum (volume11),

    Sum (volume12),

    Sum (volume13),

    Sum (volume14),

    Sum (volume15),

    Sum (volume16),

    Sum (volume17),

    Sum (Volume18),

    Sum (volume19),

    Sum (volume20),

    Sum (rate1),

    Sum (rate2),

    Sum (rate3),

    Sum (rate4),

    Sum (rate5),

    Sum (rate6),

    Sum (rate7),

    Sum (rate8),

    Sum (rate9),

    Sum (rate10),

    Sum (rate11),

    Sum (rate12),

    Sum (rate13),

    Sum (rate14),

    Sum (rate15),

    Sum (rate16),

    Sum (rate17),

    Sum (rate18)

    Sum (rate19),

    Sum (rate20)

    Thank you

    Prasad.

    > Could someone please help how to tune the query as its takes a long time to retrieve the results.

    The query you posted is obviously fake.

    If you ask to give us a request that you do not post and we cannot see.

    For real?

  • create table query takes too long...

    Hello experts...

    I take the backup of table A, which consist of 135 million records...

    Why use query below...

    create the table tableA_bkup in select * from tableA;

    It takes more time... always running...

    is there another way to quickly query...

    Thanks in advance...

    ECT is one of the fastest ways to do such a thing.

    Do you remember the duplicate data. This means that if your table contains 50 GB of data, then it will have to copy these 50 GB of data.

    Another way may be to use EXPDP to create a backup of the data of the table dump file. However I don't know if there is a difference in performance.
    The two versions might benefit from parallel execution.

  • Query takes too long to run after clone

    Hi all

    We have a query that works well in our development environment and take about 15 seconds to run the query. When we run the same query with the same parameters in a recently cloned instance, the query takes 1200 dry run.
    Please help us on this issue.

    Thank you
    Rambaud

    Thanks for any response.
    We have solved the problem by using indicators of index.

    Thanks for the update!

  • Query takes too long, but the cost is low

    Hi guys,.

    I run a query on two databases that were created in the same way and have the same data.

    On one, the cost is almost 1 million, and it runs in the space of a few seconds
    On the other hand, the cost is 40,000, and it does not end execution

    I looked at the plan to explain it and there is no Cartesian merge on the second query join, but it takes so long. What can I do to study this?

    Thank you

    The sqlxtplan provides comprehensive information on the query that was executed, or running, depending on the mode you choose. It has all the information of dbms_xplan plus much more. for example all the table definitions used in the query, filters of predicate query, plans for execution, his stats of all tables, indexes, etc... used in the query.
    I find the way the fastest to get an overview of how the optimizer made its decision. If it is running run mode, it, rather than using the id of sql or hash, it also gives a 10053 trace.

  • E420S fan running too long

    Hello

    I have a question about my Thinkpad Edge E420S (4401-29U; BIOS version 1.36).

    The problem is: once the fan turns on, it stays on for an unnecessarily long time, even with low cpu load. (A similar problem is described here.)

    The system is idling around 45-50 ° C. Once it hits around 55-60 ° C or more, fan comes into action and quickly lowers temperature back to 45-50... and then the fan remains on for 20-30 minutes.

    My first guess is that it is a BIOS problem, because:

    * the problem seems to be not high temperatures, but rather the fan who does not turn off the power as soon as the set temperature is reached.

    * I was not able to control the fan through the operating system, Windows 7 (using programs such as tpfancontrol) or Debian Linux (using the thinkpad-acpi kernel module).

    However, many critics of the e420s mentions silent operation, so maybe I'm wrong...

    Am I right in thinking that sounds like a BIOS problem, or maybe a hardware problem? Anyone here know if it is a complaint often and if so, if there is a new BIOS update in the pipeline?

    Thanks a lot for your help.

    Hi djunkmayl,

    You are already on the latest version of the BIOS and there is no direct definition for on BIOS CPU fan speed. But if you have installed Power Manager, then you can try "Cooling system policy" in the field "advance settings". If the problem persists, please contact local lenovo to test hardware.

    Fred

  • identifier is too long: expdp filtering using QUERY off TABLES =.

    All,

    I run large expdp work using a .bat file.  An example of one of the lines is the following:

    expdp directory "" / as sysdba "" = IMPORT_DB dumpfile=vismag_brightness%%U.dmp logfile = vismag_brightness.log ALL TABLES = sat_cat_owner.vismag_brightness QUERY = sat_cat_owner.vismag_brightness = compression:'------"where exists (" select visual_magnitude_uuid in the sat_cat_owner.visual_magnitude where sat_cat_owner.visual_magnitude.visual_magnitude_uuid=sat_cat_owner.vismag_brightness.visual_magnitude_uuid)\ "')"

    Present the results of .bat to this:

    OracleExportDataPumpIssues.png

    I then tried to put it in a settings file.  As always, you can see in the picture above, he already gave me an error, but I corrected which and he always gave me the same error.  The application was the same as above, only had no slashes return of evasion.

    Now this is why I am sure that I am right escape.  Now, I just need to find the reason for the identifier is too long.

    Here's a picture showing other odd behavior, trying to simplify the query to see if its because the query is too long.  AND if it is because its too long..how for I can config so it can handle?

    OracleSimpler.png

    The difference in the image above, is that the first test has only \"...while the second is what worked for me before top (if I try without the single quotes, it fails on citing the issue for the important query).  So the second cmd, as I have said, has "\" instead of just \"...and it does not work!"  When he did above for the larger request, but it gives error separated.

    Help, please!  Thank you

    Hello

    Try this instead

    Query ='sat_cat_owner.vismag_brightness: "Where exists (select visual_magnitude_uuid from the sat_cat_owner.visual_magnitude where sat_cat_owner.visual_magnitude.visual_magnitude_uuid = ku$ .visual_magnitude_uuid)" "

    Ku$ is an alias of special for the object currently being extraction - I think that in case you want to use exists, you must use this syntax - give it a try and see what happens.

    Other than that can replace you an IN clause instead?

    See you soon,.

    Rich

  • Statement Update takes too long to run

    Hi all

    I am trying to run this update statement. But its takes too long to run.
        UPDATE ops_forecast_extract b SET position_id = (SELECT a.row_id
            FROM s_postn a
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)))
            WHERE position_level = 7
            AND b.am_id IS NULL;
            SELECT COUNT(*) FROM S_POSTN; 
            214665
            SELECT COUNT(*) FROM ops_forecast_extract;
            49366
    SELECT count(*)
            FROM s_postn a, ops_forecast_extract b
            WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME));
     575
    What could be the reason for the update statement to run so long?
    Thank you

    polasa wrote:
    Hi all

    I am trying to run this update statement. But its takes too long to run.

    What could be the reason for the update statement to run so long?

    You did not say what means "too long", but a simple and good reason might be that the scalar subquery on "s_postn" using a full table for each run scan. Potentially this subquery is executed for each row of the table "ops_forecast_extract" that satisfies your filter predicates. 'Potentially' due to "filter/subquery optimization" cunning of the Oracle execution engine that tries to cache results of already executed of instances of subquery. Given that the in-memory hash table that contains these cached results is limited in size, the optimization algorithm depends on the sort order of data and could suffer collisions of hash that it is unpredictable, how this optimization works in your particular case.

    You can view the execution plan, it should at least tell you how Oracle will run the scalar subquery (that tell you nothing about this "filter/subquery optimization" feature).

    Follow the generic guidelines how to generate a useful plan explain output and how to post here:

    Could please post a correctly formatted explain you plan output using DBMS_XPLAN. SCREEN, including the 'Predicate information' section below the plan to provide more details about your statement. Please use the noformat} [{noformat} code {noformat}] {noformat} before tag and {noformat} [{noformat} / code {noformat}] {noformat} tag or after the noformat} {{noformat} code {noformat}} {noformat} tag before and after to improve the readability of the outing:

    In SQL * more:

    SET LINESIZE 130
    
    EXPLAIN PLAN FOR ;
    
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    

    Note that the DBMS_XPLAN package. DISPLAY is only available from 9i on.

    In 9i and above, if "Predicate information" section is missing from the DBMS_XPLAN. Output display, but you get the message "Plan table is old version" instead, you must recreate your plan table using the script server '$ORACLE_HOME/rdbms/admin/utlxplan.sql '.

    In previous versions, you can run the following in SQL * Plus (on the server) instead:

    @?/rdbms/admin/utlxpls
    

    A different approach in SQL * more:

    SET AUTOTRACE ON EXPLAIN
    
    ;
    

    also displays the execution plan.

    In order to get a better understanding where your statement passes the time, you might want to turn on SQL tracing as described here:

    When your query takes too long...

    and after the "tkprof' out here, too.

    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/

  • To access large partitioned tables over a database link - traps?

    Hello

    We are in the middle of a business acquisition, and I have a question on the use of links to database access efficiently to large tables. There are two distinct geographical database instances, both on Oracle 10.2.0.5 sitting on Linux boxes.

    The main forum (PSHR) contains a PeopleSoft HR system and pays and is sitting in our data center.

    The secondary instance (HGPAY) runs a payroll application home grown and is in a different datacenter to PSHR.

    The requirement is to allow PeopleSoft (PSHR) to display data of payroll (one employee at a time) targeted to the secondary instance.

    For example in HGPAY

    CREATE TABLE MY_PAY_DATA AS
    SELECT TO_CHAR (A.RN, ' 00000000') 'EMP' - it is a figure 8 leading 0 unique identifier
    '20110' | TO_CHAR (B.RN) "PAY_PRD" - it is a format of exercise more than fifteen days in the year (01-27)
    C.SOME_KEY - it is the element of remuneration being considered - effectively randomly
    , 'XXXXXXXXXXXXXXXXX' "FILLER1.
    , 'XXXXXXXXXXXXXXXXX' "FILLER2".
    , 'XXXXXXXXXXXXXXXXX' "FILLER3".
    FROM (SELECT ROWNUM 'RN' FROM DUAL CONNECT BY LEVEL < = 300) has
    , (SELECT ROWNUM 'RN' FROM DUAL CONNECT BY LEVEL < = 3) B
    (SELECT TRUNC (ABS (DBMS_RANDOM. (Random())) 'SOME_KEY' FROM DUAL CONNECT BY LEVEL < = 300) C
    ORDER OF PAY_PRD, EMP

    HGPAY. MY_PAY_DATA is the range partitioned on EMP (approximately 300 employees by partition) and the list below partitioned on PAY_PRD (3 pay periods a secondary partition). I limited the above create statement to represent a sub-partition of data.
    Every employee generates an average of 300 lines in this table each pay period. The table has about 180 million lines and all fifteen days more.

    In PSHR

    CREATE VIEW PS_HG_PAY_DATA (MEP, PAY_PRD SOME_KEY FILLER1, FILLER2, FILLER3)
    AS SELECT EMP, PAY_PRD SOME_KEY FILLER1, FILLER2, MY_PAY_DATA@HGPAY FILLER3

    PeopleSoft would then generate SQL along the lines of

    SELECT * FROM PS_HG_PAY_DATA WHERE EMP = '00002561' AND PAY_PRD = '201025'

    The link between data centers where PSHR and HGPAY sit isn't the best in the world, but I expect dozens of hits per day rather than thousands, so I think that the link must have sufficient bandwidth to meet the requirements.

    I tried a quick test on two instances of size production test and it works because it presents the data, when I look at the plan of the explain command that I can see that the remote database is only presenting the relevant secondary partition on PSHR rather than the entire table. Until I get in the back with a "job well done" - y at - it a witch hunt that I am absent using dblink to access the partitioned tables of big?

    Yes, it's just. A lot of it depends on exactly what happens in different "oops" scenarios - you are, for example, just burn some CPU extra until someone comes to the DBA and says "my query is slow" or saturating the network has an impact on critical applications or long random queries prevent some maintenance operations of partition.

    In my mind, the simplest possible solution (assuming you are using a username that is fixed in the database link) would be to create a profile on HGPAY for user defined for the link of database that set a value LOGICAL_READS_PER_CALL which was large enough to handle any request '' reasonable '' and low enough to quickly kill any session that has tried to do something 'stupid '. Obviously, you have to define 'stupid' in your particular environment where the scope of a 'simple reconciliation report' is not defined. If there is no political problem and you can adjust the values of profile to the wire when you encounter new reports that slowly increase what is considered '' reasonable '' is probably the most straightforward approach. If you have to put in a change request to change the parameter which must be reviewed by the Control Board change at its next quarterly meeting with the outsourced DBA seller, on the other hand, you could turn a report by 30 minutes in 30 hours over 30 days. However, in an ideal world, this is where I would start.

    Becomes more complex, you can use the resource manager to kill applications running too long on the wall clock. Since the network will almost certainly the bottleneck, it is probably unlikely that the limitation of the CPU will do much good - probably you can saturate the network with a very small amount of CPU. Limitation in my mind of the network is an additional step in complexity according to the specifics of your situation and what you are competing with.

    Justin

Maybe you are looking for

  • Cubbies are going to win tonight...

    My doughnuts are on the Cubs.

  • Why the different RSSI in the same place?

    My iPad 2 Air and older MB Air, iPhone 6 + are all sitting on my desk, within 1 foot shape each other.  The TC is about 15 feet through 2 walls.  It is located about 8 feet above the ground.  RSSI for MBA is - 68 dBm, iPad is-65 dBm and iPhone is dBm

  • HP 15 laptop. : UNINSTALATION OF SOFTWARE.

    I tried to install a game (Sanandreas), he has been unable to install and when I tried a second time, I have been informed that there is. So I went to check my list of applications installed that are there. When I tried to uninstall it, it was not po

  • Auto update under xp home sp2 problem - will not start

    original title: auto update under xp home sp2 problem I am currently running xp sp2 and my auto Security Center updates has been disabled and will not let me turn it back on. I can enable it in the Control Panel, but when I open the Security Center i

  • Windows 8 on desktop script error

    Whenever I turn on the desktop computer I get an annoying message that reads "Script error: an error has occurred in the script on this page." Line: Char 0: 0 error: Script Error Code: 0 URL: http://widgets.xrosview.com/widgets/3rdParty/jQuery.1.7.1.