Table slow access by index rowid
Hi all10.2.0.1
I have two queries that do the same thing but written in a different way.
A quick index is scan and accesses the table with rowid, the other performs a full table scan.
Partial TKPROF for query performing index scan Q_I:
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.01 0.01 0 0 2 0
Execute 1 0.00 0.00 0 0 13 0
Fetch 5 0.14 0.69 13 24252 0 53
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 7 0.15 0.70 13 24252 15 53
Misses in library cache during parse: 1
Rows Row Source Operation
------- ---------------------------------------------------
53 SORT GROUP BY (cr=24252 pr=13 pw=0 time=692418 us)
1103 HASH JOIN (cr=24252 pr=13 pw=0 time=691345 us)
222 TABLE ACCESS FULL HOD_USER (cr=5 pr=0 pw=0 time=42 us)
1100 VIEW (cr=24247 pr=13 pw=0 time=690198 us)
1100 HASH GROUP BY (cr=24247 pr=13 pw=0 time=689097 us)
36496 TABLE ACCESS BY INDEX ROWID DDO_ALT (cr=24247 pr=13 pw=0 time=109536 us)
36496 INDEX FULL SCAN PK_DDOALT (cr=2226 pr=6 pw=0 time=36532 us)(object id 117105)
Rows Execution Plan
------- ---------------------------------------------------
0 SELECT STATEMENT MODE: ALL_ROWS
53 SORT (GROUP BY)
1103 HASH JOIN
222 TABLE ACCESS MODE: ANALYZED (FULL) OF 'HOD_USER' (TABLE)
1100 VIEW
1100 HASH (GROUP BY)
36496 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
'DDO_ALT' (TABLE)
36496 INDEX MODE: ANALYZED (FULL SCAN) OF 'PK_DDOALT'
(INDEX (UNIQUE))
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 5 0.00 0.00
db file sequential read 13 0.09 0.55
SQL*Net message from client 5 0.00 0.00
Query run TKProf full table SCAN Q_f:call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 4 0
Execute 1 0.00 0.00 0 0 13 0
Fetch 5 0.15 0.39 17 2023 0 53
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 7 0.15 0.40 17 2023 17 53
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Rows Row Source Operation
------- ---------------------------------------------------
53 SORT GROUP BY NOSORT (cr=2023 pr=17 pw=0 time=398252 us)
648 VIEW (cr=2023 pr=17 pw=0 time=399497 us)
648 SORT GROUP BY (cr=2023 pr=17 pw=0 time=398845 us)
37537 HASH JOIN (cr=2023 pr=17 pw=0 time=564274 us)
222 TABLE ACCESS FULL HOD_USER (cr=5 pr=0 pw=0 time=267 us)
36679 TABLE ACCESS FULL DDO_ALT (cr=2018 pr=17 pw=0 time=37 us)
Rows Execution Plan
------- ---------------------------------------------------
0 SELECT STATEMENT MODE: ALL_ROWS
53 SORT (GROUP BY NOSORT)
648 VIEW
648 SORT (GROUP BY)
37537 HASH JOIN
222 TABLE ACCESS MODE: ANALYZED (FULL) OF 'HOD_USER'
(TABLE)
36679 TABLE ACCESS MODE: ANALYZED (FULL) OF 'DDO_ALT' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 5 0.00 0.00
db file sequential read 15 0.06 0.18
db file scattered read 1 0.06 0.06
SQL*Net message from client 5 0.00 0.00
Why 24247 complies for access by index rowid table, for access to the index, is 2226.Why the full table scan is faster in this case?
Hisoka says:
Why the full table scan is faster in this case?
As P. Forstmann suggested, it would help if you can post queries and their results of EXPLAIN PLAN.
Now, I know guess is bad, but I want to have a go on this one, so we'll see ;)
My comments (in no particular order of relevance/importance)
(1) you use a non patched (10.2.0.1) version which, I believe, is known to contain many bugs (and therefore can throw 'surprises')
(2) the name of the index, it is clear that PK_DDOALT is a unique index (supporting the primary key constraint) table DDO_ALT so
factor clustered index is (probably) not the issue.
(3) the TkProf output tells 36496 lines are currently extracted from table DDO_ALT in the query that uses the index analysis while
36679 lines are currently extracted a DDO_ALT table in the query that uses the full table scan.
It seems that the DDO_ALT table has about 36679 lines. Now, it will be slower (such as oracle to access most of these lines using the index
you will need to visit a (table) block at the same time (and will eventually visit same block several times) compared to the full table scan.
who reads several blocks at a time (and eventually NOT have to visit same block several times). This can be confirmed
by the numbers "cr" TkProf. 24247 consistent gets for the query using access indexed for 36496 lines (with the exception of consistent gets for the reading of the index)
2018 coherent vs gets to access 36679 lines.
(4) the operation "line Source" indicates that the query using an indexed access is written so that it forces the use of the index (most likely
using an indicator of index). It's that reason optimizer uses "INDEX FULL SCAN" and not "INDEX RANGE SCAN". A FULL INDEX SCAN bed set
structure of the index, a block at a time, which is not an efficient operation compared to the optimizer to choose naturally "INDEX RANGE SCAN", which
that will show some of the index blocks.
(5) Finally, it appears this query that uses access indexed, is written to 'say' oracle how to process the query. Maybe it's OK if you think that
your knowledge of the data schemas is better than knowledge of the optimizer. But this certainly isn't the case here.
Your queries are probably something like
Query using index:
SELECT
FROM HOD_USER, (SELECT /*+ INDEX(DDO_ALT PK_DDOALT) */
FROM DDO_ALT
GROUP BY ) DD
WHERE HOD_USER. = DD.
GROUP BY
ORDER BY
The query using full table scan:
SELECT
FROM (SELECT
FROM HOD_USER, DDO_ALT
WHERE HOD_USER. = DDO_ALT.
GROUP BY
ORDER BY )
GROUP BY
ORDER BY
Published by: user503699 on August 21, 2010 18:47 added ORDER BY clauses for both queries
Tags: Database
Similar Questions
-
Hi all
I want to know
TABLE ACCESS BY INDEX ROWID
that comes when we set AUTOTRACE ON;
In fact
Select * from t1 where manager_id = 30 and employee_id = 130 and department_id = 140
Here I have range index on manager_id and department_id
and a unique index on employe_id
the plan is
I thought that this single number would be used because it is unique indexed and I used for her =. I don't know wether I'm right or not can you please explain and that ACCESS BY ROWID TABLE INDEX means in explaining the plan?no rows selected Execution Plan ---------------------------------------------------------- Plan hash value: 2444942575 -------------------------------------------------------------------------------- ---- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------- ---- | 0 | SELECT STATEMENT | | 1 | 133 | 1 (0)| 00:00: 01 | |* 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 133 | 1 (0)| 00:00: 01 | |* 2 | INDEX UNIQUE SCAN | T3 | 1 | | 0 (0)| 00:00: 01 | -------------------------------------------------------------------------------- ---- Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter("MANAGER_ID"=30 AND "DEPARTMENT_ID"=140) 2 - access("EMPLOYEE_ID"=130) Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 2 consistent gets 0 physical reads 0 redo size 881 bytes sent via SQL*Net to client 405 bytes received via SQL*Net from client 1 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 0 rows processed
If you have an idea you can share it please?
Thank you
Published by: 810345 on May 10, 2011 21:22You have a unique index on employe_id and a predicate of equality against employee_id, so that the optimizer has chosen to use the unique index to get the identifier for the line with employee_id = 130. This is the entrance of access ("EMPLOYEE_ID" = 130) against the unique systematic index scan in the plan.
Using this rowid, it accessible table a) check if manager_id = 30 and department_id = 140 (this is the filter ("MANAGER_ID" = 30 AND "Department_id" = 140) entered against access by index rowid plan the table) and b) retrieve the other columns from the employee table to meet select * part of your query.
All indexes store the ID of the row indexed as part of the index. This is the reason for which an index can speed up access to the table, because usually the index is smaller than the table and is stored sorted by the value of the indexed column.
John
-
Is it possible to avoid the access "BY INDEX ROWID'?
Hello
I run a query for the primary key of a table with a text index on a column of text, something like
Pkey SELECT FROM table WHERE CONTAINS (text, 'foobar') > 0.
As expected, the index is scanned for the corresponding ROWID and then the rows are retrieved (BY INDEX ROWID).
I wonder if its possible to include the primary key in the text index column, so that the table must not be access at all when querying for the primary key (this is possible with regular index).
I tried
1. creating a Composite field Index (i.e. including the primary key column in the FILTER clause BY index)
2. create a SURLABASEDESDONNEESDUFABRICANTDUBALLAST section on pkey
3. creating a MONTANA section on pkey
In all cases, the lines were always accessible by ROWID.
Any ideas?If you 11.2, you can try using the Interface of the result value. This query system (based on XML) will allow you to retrieve values SURLABASEDESDONNEESDUFABRICANTDUBALLAST directly from the text index without accessing the base table.
In previous versions, unfortunately I don't think that there is a way to do it without going through the base table.
-
Table external slow access of compiled PL/SQL, quick of SQLPLUS
I'm under Oracle Standard Edition One 12.1.0.1.0 Windows x 64. Small and simple external table queries since met PL/SQL are run very slowly with a second 18 delay, but the same sqlplus queries run very fast, both on the same instance. I ran Profiler DBMS and debugged PL/SQL to confirm that it takes 18 seconds to query the file header record in an external table in PL/SQL, but the same exact sqlplus query runs in 0.07 seconds.
This seems very odd. I searched online and OTN, but I can find no example of why this would happen between the two access methods in the same instance. Something is suspended until the execution of the external PL/SQL table compiled very hurt to be 18 seconds vs 0.07 seconds of sqlplus. Before you buy the license Oracle I tried the table external access on trial Enterprise Edition on a laptop Windows x 64 where approaches both the PL/SQL and SQL executed just as fast (0.07 seconds in this case). The main difference now is Standard Edition and Enterprise and production running on a Windows x 64 server. I have no parallel enabled in the environment.
The log file of external table displays this information message:
KUP-05004: WARNING: disabled source Intra concurrency because select parallel is not sought.
I think it's just because I'm not under parallel access on the external table. The message is the same if the questioning of PL/SQL or sqlplus.
It seems to be something coherent overall of all external PL/SQL tables in this case, because I studied 3 external tables and they all almost exactly 18 seconds later to PL/SQL vs sqlplus, even if number of rows of tables outside and requests files access to them are different.
How can I know which slows down access PL/SQL method and correct to my production programs? I created a test case and ran to share results:
I create an external table of test:
-Create table
create the table TEMP_EXT
(
Field1 VARCHAR2 (10),
VARCHAR2 (10) Field2.
field3 VARCHAR2 (10)
)
external organization
(
type ORACLE_LOADER
STRATESIS_DATA_DIR default directory
access settings
(
RECORDS DELIMITED BY '\n '.
BADFILE STRATESIS_LOG_DIR: 'temp.bad'
STRATESIS_LOG_DIR LOG file: 'temp.log'
NODISCARDFILE
FIELDS TERMINATED BY ', '.
SURROUNDED OF POSSIBLY "" "
MISSING FIELD VALUES ARE NULL
(Field1, Field2, field3)
)
location (STRATESIS_DATA_DIR: 'temp.txt')
)
reject the limit 0.
I already have the directories above put in place in the database.
I create a file temp.txt in the above data directory. It has two rows:
Field1, Field2, field3
2field1, 2field2, 2field3
I create an autonomous PL/SQL procedure (not in a package, but I get the same result if I put it in a package):
create or replace procedure tryplsql is
l_field1 temp_ext.field1%TYPE;
l_field2 temp_ext.field2%TYPE;
l_field3 temp_ext.field3%TYPE;
BEGIN
SELECT field1, Field2, field3
IN l_field1, l_field2, l_field3
OF temp_ext
WHERE field1 = "field1";
Dbms_output.put_line(l_field1 ||) ',' || l_field2 | ',' || l_field3);
end tryplsql;
I run as a sqlplus pl/sql procedure:
SQL > exec tryplsql
Field1, Field2, field3
PL/SQL procedure successfully completed.
Elapsed time: 00:00:17.68
SQL > spool off;
It takes almost 18 seconds?
I performed the simple query of sqlplus and it's quick:
SQL > select Field1, Field2, field3 from temp_ext where field1 = "field1";
FIELD1 FIELD2 FIELD3
---------- ---------- ----------
Field1 Field2 field3
Elapsed time: 00:00:00.01
SQL > spool off;
Very fast 0.01 second.
I run the following block of sqlplus:
SQL > DECLARE
l_field1 2 temp_ext.field1%TYPE;
3 l_field2 temp_ext.field2%TYPE;
4 l_field3 temp_ext.field3%TYPE;
5
6 BEGIN
7 SELECT field1, Field2, field3
8 l_field1, l_field2, l_field3
9 FROM temp_ext
10. WHERE field1 = "field1";
11
12 DBMS_OUTPUT.put_line(l_field1 ||) ',' || l_field2 | ',' || l_field3);
13
14 END;
15.
Field1, Field2, field3
PL/SQL procedure successfully completed
Elapsed time: 00:00:00.01
SQL > spool off
It is also very fast. In SQL, and even a PL/SQL block sqlplus are fast, but a procedure have complied is slow?
I have a lot of packages, procedures, functions, etc., running very fast in the DB as long as there are no external table access (no time 18 seconds). I ran DBMS Profiler on several sections of code - in all cases, that the call to the external tables takes 18 seconds. I tried to debug PL/SQL and again the request to the external tables takes 18 seconds every time.
Probably something obvious I'm missing, but I am confused. Any help is appreciated.
Support of Oracle has identified the issue as a known bug in 12.1.0.1. Bug #18824125
The workaround until patched is drop the PL/SQL as sys (not a good option), or to grant any directory of the user who executes the PL/SQL will be launched. It worked.
-
Partitioned global index on partitioned table range, but the index partition does not work
Hello:
I was creating an index partitioned on table partitioned and partitioned index does not work.
create table table_range)
CUST_FIRST_NAME VARCHAR2 (20).
CUST_GENDER CHAR (1),
CUST_CITY VARCHAR2 (30),
COUNTRY_ISO_CODE CHAR (2),
COUNTRY_NAME VARCHAR2 (40),
COUNTRY_SUBREGION VARCHAR2 (30),
PROD_ID NUMBER NOT NULL,
CUST_ID NUMBER NOT NULL,
TIME_ID DATE NOT NULL,
CHANNEL_ID NUMBER NOT NULL,
PROMO_ID NUMBER OF NON-NULL,
QUANTITY_SOLD NUMBER (10.2) NOT NULL,
AMOUNT_SOLD NUMBER (10.2) NOT NULL
)
partition by (range (time_id)
lower partition p1 values (u01 tablespace to_date('2001/01/01','YYYY/MM/DD')),
lower partition (to_date('2002/01/01','YYYY/MM/DD')) tablespace u02 p2 values
);
create index ind_table_range on table2 (prod_id)
() global partition range (prod_id)
values less than (100) partition p1,
lower partition p2 values (maxvalue)
);
SQL > select TABLE_NAME, SUBPARTITION_COUNT, HIGH_VALUE, nom_partition NUM_ROWS of user_tab_partitions;
TABLE_NAME NOM_PARTITION SUBPARTITION_COUNT HIGH_VALUE NUM_ROWS
----------- ---------------- ------------------ -------------------------------------------------------------------------------- ----------
TABLE_RANGE P2 0 TO_DATE (' 2002-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 259418)
TABLE_RANGE P1 0 TO_DATE (' 2001-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIA 659425)
SQL > select INDEX_NAME, NUM_ROWS nom_partition, HIGH_VALUE user_ind_partitions;
INDEX_NAME NOM_PARTITION HIGH_VALUE NUM_ROWS
------------------------------ ------------------------------ -------------------------- ----------
P1 IND_TABLE_RANGE 100 479520
IND_TABLE_RANGE P2 MAXVALUE 439323
SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE');
SQL > EXECUTE DBMS_STATS. GATHER_TABLE_STATS (USER, 'TABLE_RANGE', GRANULARITY = > 'PARTITION');
SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE');
SQL > EXECUTE DBMS_STATS. GATHER_INDEX_STATS (USER, 'IND_TABLE_RANGE', GRANULARITY = > 'PARTITION');
SQL > set autotrace traceonly
SQL > alter shared_pool RAS system;
SQL > changes the system built-in buffer_cache;
SQL > select * from table_range
where prod_id = 127;
---------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
---------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 16469 | 1334K | 3579 (1) | 00:00:43 | | |
| 1. RANGE OF PARTITION ALL THE | | 16469 | 1334K | 3579 (1) | 00:00:43 | 1. 2.
|* 2 | TABLE ACCESS FULL | TABLE_RANGE | 16469 | 1334K | 3579 (1) | 00:00:43 | 1. 2.
---------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - filter ("PROD_ID" = 127)
Statistics
----------------------------------------------------------
320 recursive calls
2 db block Gets
13352 consistent gets
11820 physical reads
0 redo size
855198 bytes sent via SQL * Net to client
12135 bytes received via SQL * Net from client
1067 SQL * Net back and forth to and from the client
61 sorts (memory)
0 sorts (disk)
15984 rows processed
Once the sentence you say ' does not ' and then you go to paste plans that seem to show that it "works".
What gives?
In fact, if you look at the plans - think Oracle you have 16 k rows in the table and he'll be back k 12 rows for your select statement. In this case, Oracle is picking up the right plan - full scan 16 ranks of k is a lot less work to digitize the index lines k 12 followed by the research of rank k 12 rowid.
-
The files on a network drive. Win7. FM 8. I renamed the files. Regenerated. Created a new book. Nothing works.
I have no dashes and underscores in file names, but no other special character.
Need for emergency assistance.
The error message is:
Can not find the file named
\SOL\Data\TechDocs\DRAFT\Shiva\OperatorManual\096-0461-001C-1.
FM.
Make sure that the file exists.
______________
Note that the table of contents and INDEX are listed in the book without a path while the chapter of body is the entire path (above) in the book view.
Thank you
IIRC, FM8 had a problem with a path with no subfolders 5 (or 6?). Try to put files up to a few levels or create a mapped network drive down to the lower levels.
-
RH10 fails to generate the table of contents or index
RH10 has not generated table of contents or index once I have updated a reorganization project and removal of several subjects. I used the editor of broken links to create new links, but this does not solve the problem.
Hello again
In this case, it would appear that you may need to apply some patches of RoboHelp. See the link below and take these measures.
See you soon... Rick
-
Table of contents and indexes appears in live Webhelp
I work in a HR 10 draft updated from RH 9 project. During the generation of Webhelp, local output displays fine, but once compiled and download our online application, the table of contents and Index are not displayed - what I mean is that the tabs exist, you can click on them, but they are empty. Research works, as well as the header logo does not appear, although it is in the images folder that is downloaded.
More details:
- I view the project in an external file in the root folder of the project. To clarify, the project is in a folder named "Help", and the output is in a separate folder named '9.1 help' to the same level of the help file. When I provided the output, I only provide the folder «9.1 help» Could it be the cause of the problem?
- After reviewing similar issues, I find that the HCC project file does not exist in my .hhk file, nor the .glo, exit, etc. I suspect that this could be the problem. However, insofar as I understand it, it is not possible for the final .htm file for the project in the same folder that contains these output files. You must publish in a different output outside the root path folder.
- I tried to change the default table of contents and the Index under Webhelp settings > Categories > content of default in the table of contents specific to my project (this is the only table of contents and Index, so it shouldn't cause mistaked, but I don't know if this change means something).
I would be happy to provide any other details if necessary.
Thank you!
Hello
Just a parenthesis. The mark of the Web option will only apply when view you the contents of your local hard disk and that you use Microsoft Internet Explorer as browser. If you download this content to a server, the option may as well not exist. So it won't matter if it is enabled or not and would have no impact on this situation.
Change the option of DHTML shouldn't really affect it either.
@Colum - package_xx.html files are certainly part of the production of RoboHelp. After you generate WebHelp, you should see them in the whxdata folder.
I think we've established that files display fine immediately after generating it, no? So, which suggests that the issue is entirely in the hands of perforce and that the development team. (or, more accurately, NOT to do)
See you soon... Rick
-
Collections [PL/SQL] table with a unique index
Hello
Is it possible to create a table with a unique index collection?
example:
declare
type tabletype is the table of non-null number IN directory INDEXES;
tabletype_nummer tabletype;
Start
tabletype_nummer (1): = 1;
tabletype_nummer (2): = 2;
tabletype_nummer (3): = 2;
end;
2nd and 3rd index have the same value.
so he could not fill the index 3.
Thank you.
Ludo
Published by: Ludock on December 10, 2009 11:36
The unique index should be the value.Yes, he is not required to start the index within the collection of 1... regardless of the number...
Here put your index to the collection and the value of the collection as even... so you can launch it from 12 to...
Him even when modified a bitDECLARE type tabletype IS TABLE OF NUMBER NOT NULL INDEX BY BINARY_INTEGER; tabletype_nummer tabletype; v_num NUMBER; v_num1 NUMBER; BEGIN v_num := 12; tabletype_nummer(v_num) := v_num; v_num := 2; tabletype_nummer(v_num) := v_num; v_num := 2; tabletype_nummer(v_num) := v_num; v_num :=5; tabletype_nummer(v_num) := v_num; v_num1 :=tabletype_nummer.First; WHILE v_num1 IS NOT NULL LOOP dbms_output.put_line(v_num1); v_num1 := tabletype_nummer.Next(v_num1); END LOOP; END;
I assigned collection it beginning with 12 and next 2 I assigned twice and 5 next time... So now, if you check the o/p, you will get 2,5,12 which are distinct values, you want to store in the collection.
Ravi Kumar
-
problems with the table of contents and index
I do the localization for the Japan, so I'm all nice and good in Japanese (themes, table of contents and index), however, after compilation, only the TOC and India are in a font that does not support Japanese characters.
Does anyone have any ideas how to solve this problem?
Thank youThank you Pete, it's part of the solution.
In fact, what I discovered on a German forum for RoboHelp, is to set the machine to the locale for the country, and the location is made. I installed the language support pack before my problem and so I was able I was translating into topics. The problem appeared when I tried my first compilation. The subjects were still in Japanese, that I translated, but the table of contents and the index and were the only ones who wrote in a totally unknown style (not Japanese English and not another language, I know).
Now that I've changed the location of my system, it works.
So, I think that this should be a first improvement for RoboHelp, right? They boast that they support 35 languages, however the support isn't quite... finish, huh?
Furthermore, the error message continues to come even after all these changes, but I don't like too much about this, I get what I need.
Thanks again Pete for the solution and the quick response. -
Why slow DML in Index organized tables
I learned that ITO system was not suitable for tables that have a high volume of DML operations.
I want to know that:
1.) why DML operations are slow when we have data and indexes in the same place for ITO?
2.) why we take extra precautions for fragmentation to ITO that pile of paintings organized?It's as long as your application does not change for the PK values that inspire you the IOT.
If you have an application that actually modifies the values of primary key - Ouch!
Here's how to think this through:
Think of an Index on a column usually.
What happens when you update the value of this column for a line or set of lines?
The update to the line goes into the table block (and if the line does not expand or PCTFREE is adequate, there is no chaining line)
However, the update of the index entry is not just an update. Because an Index is a Structure y (unlike a heap table), in order to change the value of an Index key (even when not unique), you have to 'remove' of the 'location' (IE block) he currently resides to and "insert" in the new "place" (block) corresponding to the new value. So, for example, if change 'Aman' (probably at the head of the Index tree) to "Hemant" (somewhere in the middle), you will find that "Hemant" belongs to another block - so that the index of "Aman" entry should be removed and a new entry for "Hemant" (pointing to the same ROWID) inserted in the correct index leaf block where 'Hemant' belongs.Now, instead of an Index on a single column, think an whole table-ITO is an ordered structure. If you change the value of the key to the order (ie the Index key) then the line should be moved to the correct location that he must belong.
As it is, it is very bad design to change the values for the PK building. an IOT in such a severely design adds to the problem. Now, instead of simply delete and insert for the column values, the entire row should be deleted and inserted.
However, if you do not change the values of the PK, then you should not have problems with updates. However, if the size of the line is large (or increases with updates), you will need to handle the overflow.
Hemant K Collette
http://hemantoracledba.blogspot.com -
Paging query needed help for large table - force a different index
I use a slight modification of the pagination to be completed request to ask Tom: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
Mine looks like this to extract the first 100 lines of everyone whose last name Smith, ordered by join date:
The difference between this and ask Tom is my innermost query returns just the ROWID. Then, in the outermost query we associate him returned to the members table ROWID, after that we have cut the ROWID down to only the 100 piece we want. This makes it MUCH more (verifiable) fast on our large tables, because it is able to use the index on the innermost query (well... to read more).SELECT members.* FROM members, ( SELECT RID, rownum rnum FROM ( SELECT rowid as RID FROM members WHERE last_name = 'Smith' ORDER BY joindate ) WHERE rownum <= 100 ) WHERE rnum >= 1 and RID = members.rowid
The problem I have is this:
It will use the index for the column predicate (last_name) rather than the unique index that I defined for the column joindate (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can reference using one of the following methods:SELECT rowid as RID FROM members WHERE last_name = 'Smith' ORDER BY joindate
SELECT /*+ index(members, joindate_idx) */ rowid as RID FROM members WHERE last_name = 'Smith' ORDER BY joindate
Whatever it is, it now uses the index of the column ORDER BY (joindate_idx), so now it's much faster there not to sort (remember, VERY large table, millions of records). If it sounds good. But now, on my outermost query, I join the rowid with the significant data in the members table columns, as commented below:SELECT /*+ first_rows(100) */ rowid as RID FROM members WHERE last_name = 'Smith' ORDER BY joindate
As soon as I did this join, this goes back to the use of the index of predicate (last_name) and perform the sort once he finds all the corresponding values (which can be a lot in this table, there is a cardinality high on some columns).SELECT members.* -- Select all data from members table FROM members, -- members table added to FROM clause ( SELECT RID, rownum rnum FROM ( SELECT /*+ index(members, joindate_idx) */ rowid as RID -- Hint is ignored now that I am joining in the outer query FROM members WHERE last_name = 'Smith' ORDER BY joindate ) WHERE rownum <= 100 ) WHERE rnum >= 1 and RID = members.rowid -- Merge the members table on the rowid we pulled from the inner queries
My question therefore, in the query full above, is it possible that I can get to use the ORDER of indexing BY column to prevent having to sort? The join is what makes go back to using the predicate index, even with notes. Remove the join and just return the ROWID for these 100 records and it flies, even over 10 millions of documents.
It would be great if there was some generic hint that could accomplish this, such as if we change the table/column/index, do not change the indicator (indicator FIRST_ROWS is a good example of this, while the INDEX indicator is the opposite), but any help would be appreciated. I can provide explain plans for the foregoing, if necessary.
Thank you!
-
Extremely slow synchronization of index of the substring
Oracle on RedHat Linux x 64 11.2.0.2 (5,7)
I created a partitioned CONTEXT index in a NOPOPULATE State. The index is defined on a column of a table partitioned using an attribute NULL_FILTER and SUBSTRING CLOB. I then used the following procedure to fill the files queued for indexing.
BEGIN
CTX_DDL. () POPULATE_PENDING
idx_name = > "CONTENT_VALUE_IDX"
part_name = > 'P_2012_12 '.
);
END;
/
This procedure seems to work for an appropriate period of time, but ended up with the following error:
ORA-20000: Oracle text error:
DRG-50857: error Oracle in drvddl. ProcessOnlinePending
ORA-20000: Oracle text error:
DRG-50857: error Oracle in textindexmethods. ODCIIndexDelete
ORA-20000: Oracle text error:
DRG-10607: index meta data are not ready yet for the DML queues
DRG-50857: error Oracle in drdmlpo
ORA-20000: Oracle text error:
DRG-10502: 1766 index does not exist
ORA-06512: at "CTXSYS. DRUE", line 160
ORA-06512: at "CTXSYS. DRVXMD', line 42
ORA-06512: at line 1
ORA-30576: dictionary of the context error loading Option
ORA-06512: at "CTXSYS. DRUE", line 160
ORA-06512: at "CTXSYS. CTX_DDL', line 1366
ORA-06512: at line 2
However, the number of records that have been entered in the DR$ PENDING corresponded with the same number of records in the table that is to be built on this index. So, I hope that this error can be ignored?
I then try to sync the lines on hold with the following text:
BEGIN
CTX_OUTPUT. START_LOG ('content_value.log');
END;
/
BEGIN
CTX_DDL. () SYNC_INDEX
idx_name = > "CONTENT_VALUE_IDX"
memory = > "2000 M",
part_name = > "P_2012_12"
parallel_degree = > 16
);
END;
/
The process begins in parallel 16 and logs show the documents being indexed. After about an hour or two, the paper then shows "Writing data index ($I) to the database." and then appears to process the data of the substring that the log shows "Substring writing data ($P) to the database." This is the point that the parallel process begins to go to series. Restraint begins to show in the data base. Blocking the session indicates an expectation of 'db file sequential read' event and the sessions that begin to queue have a wait state of ' enq: TX - line lock conflict.
$P TEXT table support is being filled and lines are deleted from the DR$ waiting for the table, then the process does work. The partition which was being indexed has only 27 lines, however the process lasted a few WEEKS before I finally killed the process.
There is a note on Metalink (parallel and series SYNC_INDEX text is slow when SUBSTRING_INDEX is enabled (Doc ID 840097.1)) which seems to solve this same scenario, but says that the problem should be solved in 11.2.0.2.
Another sync non-text substring index with no problems. The 'Oracle Text' option is valid in the data base and none of the CTXSYS objects are DISABLED.
Someone at - it ideas?
So, as you guessed correctly, the fundamental problem is that 16 parallel workers try to write to the table in the face of the claim and the substring by.
Our solution has been to change the parameter MAXTIME sync_index something very short - a half hour - so that the amount of data to write was a little smaller and the claim was broken up more quickly.
We did originally because we wanted more insight in the newspapers and the pace of progress in the indexing, but after testing with multiple values MAXTIME, we found that 30 minutes gave us the best overall in terms of indexed documents throughput / hour.
Your values will likely change, but with a bit of journaling, you should be able to find a practice, if a solution is not optimal.
-
Create Table in Access with AutoIncrement field
Hello
I like to create a new table in an access database.
The problem is to create an ID field with autoincrement. I can add "not null" and "primary key" for the field, but not the option "autoincrement".
You have a solution to this problem?
Thank you
Marcus
It seems that if the Autoincrement does not work, you can try Counter as specification of column.
/Y
-
I did a clean install of ESXi 6 with HP supplied image (ESXi-6.0.0-2494585-HP-600.9.1.39-Mar2015).
Access to and from the warehouses of data over network via vSphere Client (6.0.0 - 2502222) is very slow - ~ 10 Mbps (there are several hundred under ESXi 5.5)
I suspect that ESXi 6 limited CPU resources used by the host to 230 MHz system.
I can't change the settings 'System Resource Reservation"(unlike ESXi 5.5, where I can change and switch to Simple or advanced mode).Hey ArnisR,
I finally found the problem. In the last 5.5 ESXi and version 6.0, they replaced the driver hpvsa (HP ISO vSphere!). With these drivers, I have known major problems with banks of data and, therefore, the controller B120i (RAID) of the Gen8 MicroServer HP.
The problem is caused by the last (HP) ISO (from March);
-Mar2015.iso 5.5.0 - Update2-2403361-HP - 550.9.2.27 VMware ESXi
-Mar2015.iso 6.0.0 - 2494585-HP - 600.9.1.39 VMware ESXi
I found out (because I had an older ISO), the ISO VMware ESXi 5.5.0-Update2-2068190-HP-5.77.3-Nov2014.iso works well! With this ISO standard, all performance issues disappeared.
The difference between the ISO is as follows. The former ISO contains the driver of storage scsi-hpvsa 5.5.0 - 88OEM. ISO (s) of March come with new storage driver scsi-hpvsa 5.5.0 - 92OEM or scsi hpvsa - 5.5.0 - 90. These drivers are the cause of the problems in the controller of B120i!
Installing ESXi 5.5 or 6 since last ISOs, you must manually install the old driver of storage (SCSI hpvsa - 5.5.0 - 88). I tested with the HPSA file scsi vib - 5.5.0 - 88OEM.550.0.0.1331820.x86_64.vib. Then I adjusted the ISO HP and equipped with the old driver. Now I can install ESXi 5.5 or 6 ISO (custom) of HP, which includes the former driver.
I hope this helps!
Maybe you are looking for
-
Double check my plan, please
I'm about to reset my Photos app and don't want to lose a few tedious edits, so I guess I'm looking for a validation of my plan. Background: when I place the Photos on my iMac and MacBook Air, I did not realize that several folders of photos had bad
-
I found by trial and error that iTunes has lost track of some of my songs. I suspect that it might be more, but do not know how to find out other than by "trial and error".
-
SCANNING SOFTWARE not to LOAD DO NOT Deskjet 2050
HIE, I use an all in one HP deskjet 2050 (J510 series) on the software of windows 7. I installed the software HP requred on my laptop for all the required drivers are installed. Printing works fine. However the same scanner software will not load whe
-
Hello world! I have a problem to solve on my VI (Please find the attached photo). I need to control the flow of a pump (timered) if it receives the signal of a DI.the signal to the second timer (that of the pump flow rate) is led by a first timer tha
-
USB flash drive receives an error "volume does not contain a recognized file system" in Windows 7
I plugged my USB on a windows 7. He always invites me to analyze and correct or cancel. I cancelled each time, but I got bored with it popping up each time, so I said to investigate and fix. A loading screen came so I waited patiently. After that it