A SQL better to avoid increases in the index

Our developer past this code along with us as we receive some performance and behavior in our DB 9.2.0.7. Using this process, our 4 MB index rises to more than 1.5 GB and we are forced to re - org to bring him down.
BEGIN
PRETERR := 'NO ERROR';
PRETCODE := 0;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectalias';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectalias', V.PVR_ALIAS, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_ALIAS IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectlender';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectlender', V.PVR_BUSINESS_NAME, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_BUSINESS_NAME IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectlendername';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectlendername', PP.PRP_COLUMN_1, NULL, NULL
FROM T_POLICY, T_POLICY_PARTY, T_POLICY_PARTY_PROPERTY PP
WHERE POL_POLICY_ID = PPA_POL_POLICY_ID
AND PPA_EFFECTIVE_END_DATE = TO_DATE('9999-01-01', 'RRRR-MM-DD')
AND PPA_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
AND POL_POLICY_ID = PP.PRP_POL_POLICY_ID
AND PP.PRP_EFFECTIVE_END_DATE = TO_DATE('9999-01-01', 'RRRR-MM-DD')
AND PP.PRP_COLUMN_1 IS NOT NULL
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectinsinstcode';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectinsinstcode', V.PVR_INSTITUTION_CODE, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_INSTITUTION_CODE IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectinstransit';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectinstransit', V.PVR_TRANSIT_NUM, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_TRANSIT_NUM IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectSubInstCode';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectSubInstCode', V.PVR_INSTITUTION_CODE, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_INSTITUTION_CODE IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectSubTransNum';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectSubTransNum', V.PVR_TRANSIT_NUM, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND V.PVR_TRANSIT_NUM IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectFileOwner';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectFileOwner',
PVR_FIRST_NAME || ' ' ||
DECODE(PVR_MIDDLE_NAME,
NULL,
'',
PVR_MIDDLE_NAME || ' ') || PVR_LAST_NAME,
NULL,
PTY_PARTY_CODE
FROM T_ROLE TR, T_USER_ROLE TUR, T_PARTY TP, T_PARTY_VERSION TPV
WHERE TP.PTY_PARTY_ID = TPV.PVR_PTY_PARTY_ID
AND SYSDATE BETWEEN TPV.PVR_EFFECTIVE_START_DATE AND
TPV.PVR_EFFECTIVE_END_DATE
AND TP.PTY_PARTY_ID = TUR.ULE_PFY_PTY_PARTY_ID
AND (SYSDATE BETWEEN TUR.ULE_START_DATE AND TUR.ULE_END_DATE OR
TUR.ULE_END_DATE IS NULL)
AND TR.RLE_ROLE_ID = TUR.ULE_RLE_ROLE_ID
AND PTY_PARTY_CODE NOT LIKE 'LTEST%'
AND TR.RLE_ROLE_NAME IN
('VPOPS', /*'VPRSK2', */
'OPSLEADER', 'TEAMLEADER', 'OPSLEVEL5', 'OPSLEVEL4', 'OPSLEVEL3',
'OPSLEVEL2', 'OPSLEVEL1', 'OPSTRNG')
AND PTY_PARTY_CODE IS NOT NULL
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectbrokername';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectbrokername', PP.PPA_NAME_BROKER_TEXT, NULL, NULL
FROM T_POLICY, T_POLICY_PARTY PP
WHERE POL_POLICY_ID = PPA_POL_POLICY_ID
AND PPA_EFFECTIVE_END_DATE = TO_DATE('9999-01-01', 'RRRR-MM-DD')
AND PPA_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
AND TRIM(PP.PPA_NAME_BROKER_TEXT) IS NOT NULL 
ORDER BY 2;

DELETE FROM T_TEAM_LIST_VAL WHERE LIST_DOMAIN = 'selectorg';
INSERT INTO T_TEAM_LIST_VAL
(LIST_DOMAIN, LIST_VALUE_1, LIST_VALUE_2, LIST_VALUE_3)
SELECT DISTINCT 'selectorg', PT.PTY_PARTY_CODE, NULL, NULL
FROM T_PARTY_VERSION V, T_PARTY PT, T_PARTY_FUNCTION F
WHERE PT.PTY_PARTY_ID = V.PVR_PTY_PARTY_ID
AND F.PFY_PTY_PARTY_ID = PT.PTY_PARTY_ID
AND SYSDATE BETWEEN PVR_EFFECTIVE_START_DATE AND
PVR_EFFECTIVE_END_DATE
AND PT.PTY_PARTY_STATUS <> 'D'
AND PT.PTY_PARTY_CODE IS NOT NULL
AND F.PFY_SHR_STAKE_HOLDER_FN_CODE = 'LENDER'
ORDER BY 2;
COMMIT;
1 it is with a delete and insert one after another, it will grow quickly? Would it not be better to perform all delete them first, validation and then inserts and commit?

Question 2 is at a high level, what method would be better. We have much that truncation, however, the developer only deletes the data of 40%.

huh? wrote:
Our developer past this code along with us as we receive some performance and behavior in our DB 9.2.0.7. Using this process, our 4 MB index rises to more than 1.5 GB and we are forced to re - org to bring him down.

Your table definition shows the column indexed to TANK (200) - which means the length fixed; up to 4MB is equivalent to 20,000 lines. If it grows to 1.5 GB and rebuilt to 4 MB at one point your index finger running then to about 80 KB per index entry. If, as you describe, you only remove about 40 percent of the data and re - insert a similar amount that once the you must have hit a bug.

You're on 9.2.0.7 (buggy) - were you using SAMS (also buggy). I came across a bug with the SAMS once that gave rise to a process using only 3 blocks from each measure in the index that it is returned in a pl/sql loop to change a few hundred lines. Different circumstances of yours and an earlier version - but you can beat something similar.

A few thoughts:


    If it's in the SAMS move the indexes of a tablespace managed by freelist to see what is happening
    If you need index could make you it unusable for the load
    If you have the index at all?
    This table would be partitioned list on listdomain - you can then use Exchange partition to load the data like this

Commit between delete and insert allows generally in such cases.
Between each pair of delete/insert (in the absence of bugs) should help

Concerning
Jonathan Lewis.

Tags: Database

Similar Questions

  • SQL tuning advisor recommnds to create the function SYS_OP_C2C function index

    I have a large table and an index on it. I use a tool to fill data, this simple tool submits the sql for Oracle DB and it does NOT index to use for requests. When I run the sql tuning advisor, he recommends to create additional indexes and use the SYS_OP_C2C function, which I don't want.

    When I run the query through sql plus picks it up in the index.
    Someone of you came, why its recommend that additional nonsense?

    create index abc.xxxx on this_table (SYS_OP_C2C ("this_column"));

    Thank you

    The internal Oracle SYS_OP_C2C function perform the conversion of a set of characters to another set of characters - C (haracterSet) 2 c (haracterSet). There are situations where you will see this conversion without explicit, as in this case command that should be a sign that the data types are not the same and the implicit conversion takes place and this could also be a problem from the point of view performance because it can disable the use of the index.

    Make sure you the characterset and nls set of all of the database and the tool are the same.
    Make sure that the data type of the column in the index is the same as the database.
    Confirm the ETL vendor for your database support and fixes, etc..

    Optimizer will only advise to use this function when the data type or the character set does not match.

    Thank you
    Kerry

  • PL/SQL... avoiding the database

    Dear all,

    Maybe it's a weird question, but I want to run PL/SQL processes without writing them in the database. Let me explain...

    In the past, I've always used "CREATE OR REPLACE PROCEDURE... "to write PL/SQL code.

    However, with my current client data is "locked" and I don't have permissions to do this. Usually, this is not a problem, as almost everything I do can be managed with SQL scripts that I can call with SQL * more. No problem.

    But there are a few points where it would be very nice to set up a simple loop and repeatedly call some SQL commands (send a different filter/parameter each time clause). So my question is whether it is possible to write code PL/SQL 'temporary' in a SQL script, call this script (with SQL * more) and then to have this script without writing in the database?

    If so, then maybe someone knows a link or a howto that I can take a look at?

    Best regards and many thanks,
    Alan Searle

    They are called anonymous blocks. You can do it like that.

    DECLARE
          
    BEGIN
          
    END;
    /
    

    It can run directly within your window of sqlplus.

    Thank you
    Knani.

  • SQL Server 2005 unattended install using the script fails on Windows 2003 Cluster

    We strive to perform the installation without SQL Server 2005 via the script assistance, but the installation fails on Windows 2003 Cluster, we use Windows 2008 with HyperV running a DC with two nodes (all Win 2003). Script is...

    Start/wait setup.exe/qb VS = INSTALLVS SQLTEST = SQL_Engine INSTANCENAME = SQL123 ADDLOCAL = SQL_Engine ADDNODE = sqlnode-1, sqlnode-2 GROUP = SQL1 IP = 192.168.1.85, SQLNetwork ADMINPASSWORD = Windows8! SAPWD = Windows8! INSTALLSQLDIR=%ProgramFiles%\Microsoft SQL Server\ INSTALLSQLDATADIR = G:\SQLDATADIR\ SQLACCOUNT = SQLPASSWORD lab\sql_svc = Windows8! AGTACCOUNT = lab\sql_svc = Windows8 AGTPASSWORD! SQLBROWSERACCOUNT = SQLBROWSERPASSWORD = Windows8 lab\sql_svc! SQLCLUSTERGROUP = "lab\sql_grp" AGTCLUSTERGROUP = "lab\sql_grp" FTSCLUSTERGROUP = "lab\sql_grp" ERRORREPORTING = 1 SQMREPORTING = 1 SQLCOLLATION = SQL_Latin1_General_CP1_CI_AS

    Errors on the nodes:

    SQLSetup0008_SQLNODE1_Core (Local)

     Running: InstallSqlAction to the: 4/14/2012 22:56:39

    Installation: sql on target: SQLNODE1

    Waiting for remote setup (s) to prepare

    Remote Setup (s) is ready

    Problem of determining the State of the virtual server for the package: '1' because of the exception of data store:

    Source the name of the file: datastore\cachedpropertycollection.cpp

    Compiler timestamp: Fri 29 Jul 01:13:49 2005

    Function name: CachedPropertyCollection::findProperty

    The source line number: 63

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

    Could not find the property 'VsDataPath' {'PackageIdStateScope', ' ', '1'} in the cache.

    Source the name of the file: datastore\packageidstatescopecollector.cpp

    Compiler timestamp: Wed Aug 24 13:40:04 2005

    Function name: PackageIdStateScopeCollector::collectProperty

    The source line number: 115

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

    dataPathValue is empty

    Cluster functionality detected: SQL_Engine

    Loaded DLL:C:\Program SQL Server\90\Setup Bootstrap\sqlsval.dll Version: 2005.90.1399.0

    Source the name of the file: datastore\cachedpropertycollection.cpp

    Compiler timestamp: Fri 29 Jul 01:13:49 2005

    Function name: CachedPropertyCollection::findProperty

    The source line number: 130

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

    Unable to find property 'IPResources' {"VirtualServerInfo", "", "SQLTEST"} in the cache

    Source the name of the file: datastore\cachedpropertycollection.cpp

    Compiler timestamp: Fri 29 Jul 01:13:49 2005

    Function name: VirtualServerInfo.IPResources

    The source line number: 113

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

    Could not collect the property 'IPResources' {"VirtualServerInfo", "", "SQLTEST"}

    Transact package threw an exception.

    Error code: 0x8007000d (13)

    Windows error text: these data are incorrect.

    Source the name of the file: sqlchaining\highlyavailablepackage.cpp

    Compiler timestamp: Mon Aug 29 01:18:42 2005

    Function name: sqls::HighlyAvailablePackage:manageVsResources

    The source line number: 490

    ---- Context -----------------------------------------------

    SQLs::HighlyAvailablePackage:preInstall

    SQLs::HighlyAvailablePackage:manageVsResources

    m_dataDirPath is empty

    Cluster API threw an exception during operations of virtualization.

    Package first notify: 13

    Error code: 0x8007000d (13)

    Windows error text: these data are incorrect.

    Source the name of the file: sqlchaining\highlyavailablepackage.cpp

    Compiler timestamp: Mon Aug 29 01:18:42 2005

    Function name: sqls::HighlyAvailablePackage:manageVsResources

    The source line number: 490

    ---- Context -----------------------------------------------

    SQLs::HighlyAvailablePackage:preInstall

    SQLs::HighlyAvailablePackage:manageVsResources

    m_dataDirPath is empty

    Cluster API threw an exception during operations of virtualization.

    SQLSetup0008_SQLNODE2_Core (Local)

     

    Local configuration can complement

    Running: InstallSqlAction at: 4/2012/14 23:23:57

    Installation: sql on target: SQLNODE2

    Informs the package is ready to start: 0

    Waiting for notification start installation

    Local configuration can begin installation

    Error code: 0x8007000d (13)

    Windows error text: these data are incorrect.

    Source the name of the file: remotepackageengine\remotepackageinstallersynch.cpp

    Compiler timestamp: Wed Aug 24 13:40:17 2005

    Function name: sqls::RemotePackageInstallerSynch:preInstall

    The source line number: 128

    ---- Context -----------------------------------------------

    SQLs::InstallPackageAction: perform

    SQLs::RemotePackageInstallerSynch:preInstall

    Abandonment of the package: "sql", due to an error from the configuration of the host: 13

    Notify all ready to commit: 13

    Notify all ready to put end to: 13

    Waiting for notification complete installation

    Local configuration can complement

    Packaging return code: 13

    Complete: InstallSqlAction at: 4/2012/14 23:23:59, returned false

    Error: The 'InstallSqlAction' Action failed during execution.  Error during execution information:

    Target collection includes the local machine.

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

    Error: The 'UninstallForRS2000Action' Action failed during execution.  Error during execution information:

    Action: "UninstallForRS2000Action" will be marked as failed due to the following condition:

    The condition 'rs has been correctly upgraded level.' returned false.

    Package installation: 'patchRS2000' failed due to a precondition.

    Running: ReportChainingResults at: 4/2012/14 23:24:1

    Error: Action "ReportChainingResults" threw an exception during execution.

    One or more packages could not be installed. See logs for details of the error. : 13

    Error code: 0x8007000d (13)

    Windows error text: these data are incorrect.

    Source the name of the file: sqlchaining\sqlchainingactions.cpp

    Compiler timestamp: 1 Thu Sep 22:23:05 2005

    Name of the function: sqls::ReportChainingResults: perform

    The source line number: 3097

    Please notify.

    Assani

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums. You can follow the link to your question:

    http://TechNet.Microsoft.com/en-us/WindowsServer/bb512923

    Hope this information helps.

  • What is this new SQL Beta - 1z1 - 071 - 2 SQL - Oracle Database SQL 12 c

    Hello

    It's confusing.

    This looks like a 2nd review SQL for Oracle 12 c.

    What is this new SQL Beta - 1z1 - 071 - 2 SQL - Oracle Database SQL 12 c

    Can someone explain.

    Roger

    OK - I guess I should have held off a few hours before my previous answer.  I just got an email in the Certification of Oracle program manager. Now, I have inside information.

    1Z0-071 is a SQL new test and the role it plays is between that of the review of databases SQL and SQL Expert.  Specifically, unlike review of databases SQL, passing it will give proof of the OCA for people who spend. I don't know more than that yet.  The review details page is not available and if the subjects are currently a grey area for me.  I'll probably create a blog on the review, if I can get a few details about it.

  • SRM + SQL + 3rd party replication and suspend the DB

    Gentlemen

    What can the SRM to ensure customers a SQL VM running on (and replicated by) 3rd party storage is applied consistently? The HP SRA has code that can invoke the suspension in the virtual machine? Or is there some kind of way scripted as part of SRM, that a quiesce DB in the virtual machine can be triggered in tandem with or just as a LUN replication occurs?

    I know that HP is responsible for the ASR - but in these situations, we sometimes get caught between vendors. Looking for experience "How have any other mission critical SQL resources protected using 3PAR and SRM".

    In other words:

    We are looking for assistance with a DR implementation for a specific application of SQL. The app is on virtual machines running on 3PAR storage. We bought all the necessary "3PAR suite application licenses" and then also have VMware SRM.

    We are more concerned than LUNS replicated DR on-site production (LUN will be virtual computers hosting SQL data storage I assume) will be fully SQL-compliant (i.e. better than crash-consistent), during replication.

    We have some experience with 3PAR replications - but to my knowledge have not yet worked with the application suites.

    Question - anyone can describe what role (if any) suites of applications 3PAR can have in correctly the suspension SQL running on a virtual machine that is on a LUN 3PAR? I don't know we can do this medium - seems that we will have to use RDM (or vVOls if they are compatible SRM) be properly suspended the DB. Is there a HP storage agent that can run on a VM SQL in order to coordinate with the table when the underlying LUN snapshots are performed?

    You are right. Consistency in the application will have to be managed at the level of the array. Some providers of table (I know NetApp specifically) offer the ability to place an agent on the VMS and this agent to use the table to ensure uniformity in the application, I'm not sure of HP.

    Another option that you might look at is vSphere replication. VR offers quiecing VSS (with JEREMIAH) in native mode.

    If you are looking for a specific response to the use of replication 3PAR application suites I suggest you post to a forum of HP. vVOLs are not yet compatible with SRM and I do not see how RDM you will get what you are looking for.

    Finally, how you deal with your post, I would say that you do not assume that only men participate in this forum.

  • Performance problem on the SQL query that does not use the primary key index

    Hello!

    I have some performance issues on a single SQL query (Oracle 10 g).
    I could solve the problem by using the INDEX indicator, but I would like to know WHY this is happening.

    * Tables *.
    create table jobs)
    ID number (5) not null,
    name varchar2 (100),
    primary key constraint Job_PK (id)
    )
    /
    -Record count: 298

    create table Comp)
    integer ID not null,
    name varchar2 (100),
    primary key constraint Comp_PK (id)
    )
    /
    -Record count: 193

    -Relation m: n
    create table JobComp)
    integer ID not null,
    id_job integer not null,
    id_comp integer not null,
    primary key constraint JobComp_PK (id),
    unique key constraint JobComp_UK (id_job, id_comp),
    Constraint JobComp_FK_Job foreign key (id_job) refers to Job (id),
    Constraint JobComp_FK_Comp foreign key (id_comp) makes reference Comp (id)
    )
    /
    create index JobComp_IX_Comp on JobComp (Cod_Comp)
    /
    create index JobComp_IX_Job on JobComp (Cod_Job)
    /
    -Record count: 6431

    * Ask *.

    When I run this query, the execution plan shows the index using (JobComp_PK and JobComp_IX_Comp).
    No problem.

    Select JobComp.*
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    But when I add the field 'name' of the work table the plan uses full access table to the table of work

    Select JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in the 2.70 dry

    With the help of the index

    Select / * + INDEX (Job Job_PK) * /.
    JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    * Doubt *.

    This behavior is correct?

    PS. : I tried to recalculate the statistics, but nothing changes:

    analyze the job calculation table statistics.
    /
    change the statistical calculation of index Job_PK reconstruction;
    /
    Start
    dbms_utility.analyze_schema (sys_context ('userenv', 'current_schema'), 'CALCULATE');
    end;
    /

    [of]
    Gustavo Ehrhardt

    Gus.EHR wrote:
    Hello.
    I'm sorry for the plan unformatted.
    The execution time of the querys "without field name' and 'with the field name with suspicion" are equal.
    He has no problem caching, because I get the plans of the sequence different from the querys and repeated the performance. The result is always the same.

    I don't think that there is no problem with oracle crossing LOOP IMBRIQUEE to the HASH JOIN when you include the field name and this should be the expected behavior. But it seems that your WORKING table has a degree of parallelism set against what is causing the query to run in parallel (as JOB table is now available with full table scan, instead of indexed access earlier). It could be that the parallel execution is contributor to extra Runtime.
    (a) do you know why the degree of parallelism on the WORK table has been defined? Do you need it?

    You can see if the following query provides a better response time?

    select /*+ NOPARALLEL(JOB) */ JobComp.*, Job.Name
      from JobComp
      join Job
        on Job.id = JobComp.id_job
     where JobComp.id_comp = 134
    
  • The use of the battery has increased since the update to ios 10. Also, why can not disable the voice command. It's the most boring on the new update.

    The use of the battery has increased since the update to ios 10. Also, why can not disable the voice command. It's the most boring on the new update.

    Depending on what you mean by "voice command", either:

    Settings / general / accessibility / VoiceOver / OFF, or

    Settings / Siri / OFF

    As for your use of the battery, you can check what app pulls most of its use in the settings / battery.  A new version of the app is sometimes problematic, not necessarily iOS or iPhone.  If you see a unusual % of use of a particular application, or force-to leave it removal/reinstalling it or remove it until an update comes.  If anything seems unusual, it might be a problematic installation of iOS, in which case, you could backup your iPhone and restore it:

    Restore your iPhone, iPad or iPod touch from a backup - Apple Support

  • increase in the price of 128 gb £50 iPod? .. .are you serious Apple?

    Hi all

    I have an important anniversary later this year... hoping for a 128 gb iPod touch as a present so had my eye on it this year.

    Was expensive at £329... then suddenly last week... its place at £379!

    Apple, 15% increase in the overnight? Really?

    How do you explain this?

    Greed is my first thought...

    Floating the currency, it happens every day.

  • mail increases with the size of file and attached attachment

    The question:
    Mail with no attachment size is approximately 3, 17 KB (3,251 bytes)
    An email with an attachment 38.1 MB (38075102 bytes), where the attachment is
    27.8 MB (27820247 bytes) why this great email with attachment and is even greater
    When the attachment is larger? I've calculated 30% increase in the mail itself to size
    the size of the attachments. This causes problems with sending mail to an SMTP server with a size limit
    20 MB of not able to send a 19 MB file cause the post itself is even more important. It is only in
    Thunderbird.

    Sending a binary file as an attachment increases its size by a third due to base64 encoding sending two 8-bit characters as three characters of 7-bit ASCII.

  • Intrepid Beta testers needed. Discover the flow of information to the poster to the left of the text.

    Intrepid Beta testers needed. Discover the information flow of the poster to the left of the text box.

    Adjust the format and presentation of the ASC Web Pages

    You can see a screenshot of the discussion How can I find my own posts?  That's what your experience of the CSA will be after you apply the style of the user.  I made the changes to move the user information. I have built on the work of Hiroto, and. turingtest2.

    R

    Today is 24June

    Most recent PasteBin is dated 22June - what to test?

    EDITadded

    Why not just post the link to PasteBin here?

  • When I connect Betfair site bet, I cant get onto the Exchange to make a lay bet, once I have loged in. Betfair say you contact range

    When I connect Betfair site bet, I cant get onto the Exchange to make a lay bet, once I have loged in. Betfair people contact you about what is not their fault.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • V14 said that my droid2global is not compatible, but the beta installs fine, how is the official download installs?

    V14 said that my droid2global is not compatible, but the beta installs fine, how is the official download installs?

    I can see and download it now from the game of Google. crocadileut can you check again?

  • Satellite R830-1GZ - CPU usage high (&gt; 25%) and increase in the speed of the fan after reactivation

    Hi all

    The CPU usage of my laptop shoots upward to 25% (and beyond) and increases in fan speed considerably after waking up, but only when I use an external mouse (Microsoft Natural Wireless Laser Mouse 6000) - disconnect the mouse once it happened does not solve the problem, so I always have to restart my computer if I let go sleep with the connected mouse.

    I noticed that when this produces the system interrupts - delayed appeals procedure and Interrupt Service routine appears in the resource monitor > CPU > process and seems to explain the increase in the use of the processor.

    Any ideas on how to solve this problem would be most appreciated.

    I use a Toshiba Satellite R830 1GZ with Windows 7 (64-bit). This problem will not occur when I use the same mouse with another laptop (Dell with Windows XP).

    Thank you very much.
    CM

    > The CPU usage of my laptop shoots upward to 25% (and beyond) and increases in fan speed considerably after waking up, but only when I use an external mouse (Microsoft Natural Wireless Laser Mouse 6000) - disconnect the mouse once it happened does not solve the problem, so I always have to restart my computer if I let go sleep with the connected mouse.

    I think that the process that controls the mouse MS WLan does not close properly.
    The system to memorize it and therefore the cooling module begins to spin faster because these processes stressed the central unit.

    Maybe its caused by the mouse driver
    Have you checked if there is an update to the driver?

  • X 800 VS X 1600: I currently have a 256 MB x 1600... IM wondering if it is better than x 800 with the same memory. (256 MB)

    I currently have a 256 MB x 1600... IM wondering if it is better than x 800 with the same memory. (256 MB)

    I currently have a 256 MB x 1600... IM wondering if it is better than x 800 with the same memory. (256 MB)

    If you're talking about Ati graphics cards, then Yes, but both are very old.

Maybe you are looking for

  • Processor or fan failure

    Let me explain my situation. I have a HP Pavilion G7-2002SD with the liquid. I switched the memory and the motherboard with a new brand. Not the laptop does not start and the caps lock is flashing in the meantime. This looks like a failure of the CPU

  • Photosmart C8180 All-in-One printer that turns off completely in the middle of printing.

    I have a Photosmart C8180 All-in-One printer that powers completely in the middle of printing, wasting time, paper and ink. It restarts also sometimes more and more and more and sometimes it stops and all the lights blink quickly, show an on-screen e

  • Question relatd to the security settings on WIndows Server 2008

    In my company, we use WindowsServer 2008r, we want to block some specific Web sites for only few users in windows server 2008 r we have clicked on settings of group policy that we did not find the internet explorer, you can suggest me other solution

  • envy dv7 product # 2H77UA #ABA: 32 GB WSSD and Windows 10

    Hello: I'm a laptop dv7 product # C2H77UA #ABA with a WSSD of 32 GB which came with Win8. I've recently updated to Win10 and boot times now seem much longer. The entrance to Bishop of device for the WSSD LITEONIT LMT-32L3M-HP says it's working proper

  • Computer laptop HP 2000 series and drivers Win7

    Hello HP Rep I have Lady I know the district knows I'm into computers and asked me to get rid of windows 8 for her. She is an older Lady and has trouble with understanding computers initially. WIN8 is too difficult for someone with a slight know how