Effect with Chain row
Hi All,
what is the problem is my tables are effected with chain rows
How to solve the problem?
what is the solution?
Regards.....
Chained rows mean your table has had a lot of updated rows, and the space at PCTFREE is not enough to hold all the updated fragments within the same oracle block, so Oracle decides to place the updated row at the "nearest" possible block, leaving behing just a pointer to the new location.
When you try to access the row, the old block is searched, and when trying to retreive the row, just a pointer to the new location is retreived, causing the system to look for the updated row at the next location.
Result double IO operation = performance degradation.
In order to avoid chained rows, increase the value of PCTFREE, so that from now on the new Oracle blocks have more space to handle updates within the same row.
On the other hand, to fix the already chained rows, use:
1. export/import
2. CTAS - create table as select ...
3. analyze table ... list chained rows (the utlchain.sql script is required) and fix only the affected rows.
Similar Messages
-
Getting Chained Rows with SQL-Loader
Hi, I'm getting chained rows when loading data into an empty table. I always thought this could only happen when updating rows in a table. I'm loading into a datawarehouse, so I set the pctfree and pctused to use as much of the data blocks as possible. Here's the specs:
pctfree 5, pctused 90 (blocksize 8k).
The average rowsize is 1481 bytes.
There will never be updates or deletes on this table. The table is always created new or truncated. How come does Oracle chain about 30 percent of the rows with the above values? I had to go down to pctfree 50 in order to get chained rows = 0.
tia,
Danny Smith- check if your table has check constraints (like column not null)
if you trust the data in the file you have to load you can disable this constrainst and after the loader enable this constrainst.
- Check if you can modify the table and place it in nologging mode (generate less redo but ONLY is SOME Conditions)
Hope it helps
Rui Madaleno -
Buffer busy waits and chained rows
Hi,
I've a db with many buffer busy waits events.
This is caused by the application that run on it and many tablespaces that are in MSSM.
Many tables suffers of chained rows.
My question is, may chained rows create further impact on buffer busy waits?
Thanks.HI Stefan,
> Caused by the application due to what? High amount of INSERTs or what? Insufficient MSSM settings by database object creation? Bad physical database design (e.g. > 255 columns, column types)?
Applications and jobs perform every 30s DELETE, UPDATE and INSERT. Tablespace are in Manual Segment Space Management, not in AUTO (i think wrong database design).
>It depends. Do you mean intra-block row chaining or row chaining across various blocks? What kind of access path? Do you really experience chained
rows and not migrated rows (it is mixed up a lot of times)?
Migrated rows, row chaining across various block, caused by frequently update and delete. Migrated resolved with alter table move or exp/imp.
Thank you -
How to make thumbnails enlarge when using grid navigation effects with jquery
I have used a grid navigation effect with jquery to display several thumbnail images but i would like the images to enlarge to a bigger size when they are clicked on, i dont want another window to open but for the image to appear on the same page like lightbox, except i dont need a gallery, just the enlarging function. Please see the code below of my page and the link to see the demo of the grid nav with jquery that i used (effect- 'rows move', example 9).
http://tympanus.net/codrops/2011/06/09/grid-navigation-effects/comment-page-2/#comments
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My gallery</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<link href="gridNavigation.css" rel="stylesheet" type="text/css" />
<link href="reset.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-color: #000000;
a:link {
text-decoration: none;
color:#f1d379;
a:visited {
text-decoration: none;
color: #f1d379;
a:hover {
text-decoration: none;
color: #9d6f1b;
a:active {
text-decoration: none;
color: #f1d379;
</style>
<script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="scripts/jquery.gridnav.js"></script>
<script type="text/javascript">
$(function() {
$('#tj_container').gridnav({
type : {
rows : 2,
mode : 'rows', // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows
speed : 1000, // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
easing : 'easeInOutBack', // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
factor : 150, // for seqfade, sequpdown, rows
reverse : '' // for sequpdown
</script>
</head>
<body>
<div class="container" id="container">
<div id="navbar_gallery" class="#navbar_gallery">
<ul>
<li><a href="index.html">Homepage</a></li>
<li><a href="about_me.html" >About me</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
<div class="maintext" id="page_maintext">
<p class="page_heading">My Gallery</p>
</div>
<div class="content example5">
<div id="tj_container" class="tj_container">
<div class="tj_nav">
<span id="tj_prev" class="tj_prev">Previous</span>
<span id="tj_next" class="tj_next">Next</span>
</div>
<div class="tj_wrapper">
<ul class="tj_gallery">
<li><a href="#"><img src="images/1.jpg" alt="image01" /></a></li>
<li><a href="#"><img src="images/2.jpg" alt="image02" /></a></li>
<li><a href="#"><img src="images/3.jpg" alt="image03" /></a></li>
<li><a href="#"><img src="images/4.jpg" alt="image04" /></a></li>
<li><a href="#"><img src="images/5.jpg" alt="image05" /></a></li>
<li><a href="#"><img src="images/6.jpg" alt="image06" /></a></li>
<li><a href="#"><img src="images/7.jpg" alt="image07" /></a></li>
<li><a href="#"><img src="images/8.jpg" alt="image08" /></a></li>
<li><a href="#"><img src="images/9.jpg" alt="image09" /></a></li>
<li><a href="#"><img src="images/10.jpg" alt="image10" /></a></li>
<li><a href="#"><img src="images/11.jpg" alt="image11" /></a></li>
<li><a href="#"><img src="images/12.jpg" alt="image12" /></a></li>
<li><a href="#"><img src="images/13.jpg" alt="image13" /></a></li>
<li><a href="#"><img src="images/14.jpg" alt="image14" /></a></li>
<li><a href="#"><img src="images/15.jpg" alt="image15" /></a></li>
<li><a href="#"><img src="images/16.jpg" alt="image16" /></a></li>
<li><a href="#"><img src="images/17.jpg" alt="image17" /></a></li>
<li><a href="#"><img src="images/18.jpg" alt="image18" /></a></li>
<li><a href="#"><img src="images/19.jpg" alt="image19" /></a></li>
<li><a href="#"><img src="images/20.jpg" alt="image20" /></a></li>
</ul>
</div>
</div>
</div>
</body>
</html>Ok so i've tried to do the above as suggested but i've obviously gone wrong somewhere as the fancybox function doesnt work, all that happens when clicking on thumbnail is the bigger version is opened in another browser window?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My gallery</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<link href="gridNavigation.css" rel="stylesheet" type="text/css" />
<link href="reset.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<style type="text/css">
body {
background-color: #000000;
a:link {
text-decoration: none;
color:#f1d379;
a:visited {
text-decoration: none;
color: #f1d379;
a:hover {
text-decoration: none;
color: #9d6f1b;
a:active {
text-decoration: none;
color: #f1d379;
</style>
<script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="scripts/jquery.gridnav.js"></script>
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript">
$(function() {
$('#tj_container').gridnav({
type : {
rows : 2,
mode : 'rows', // use def | fade | seqfade | updown | sequpdown | showhide | disperse | rows
speed : 1000, // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
easing : 'easeInOutBack', // for fade, seqfade, updown, sequpdown, showhide, disperse, rows
factor : 150, // for seqfade, sequpdown, rows
reverse : '' // for sequpdown
</script>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#single_1").fancybox({
helpers: {
title : {
type : 'float'
$("#single_2").fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
helpers : {
title : {
type : 'inside'
$("#single_3").fancybox({
openEffect : 'none',
closeEffect : 'none',
helpers : {
title : {
type : 'outside'
$("#single_4").fancybox({
helpers : {
title : {
type : 'over'
</script>
</head>
<body>
<div class="container" id="container">
<div id="navbar_gallery" class="#navbar_gallery">
<ul>
<li><a href="index.html">Homepage</a></li>
<li><a href="about_me.html" >About me</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
<div class="maintext" id="page_maintext">
<p class="page_heading">My Gallery</p>
</div>
<div class="content example5">
<div id="tj_container" class="tj_container">
<div class="tj_nav">
<span id="tj_prev" class="tj_prev">Previous</span>
<span id="tj_next" class="tj_next">Next</span>
</div>
<div class="tj_wrapper">
<ul class="tj_gallery">
<li><a id="single_1" href="images/1-big.jpg" title="Row of beach huts"><img src="images/1.jpg" alt="Row of beach huts" /></a>
<li><a id="single_2" href="images/2-big.jpg" title="Bees collecting pollen"><img src="images/2.jpg" alt="Bees collecting pollen" /></a></li>
<li><a id="single_3" href="images/3-big.jpg" title="Frank"><img src="images/3.jpg" alt="Frank" /></a>
<li><a id="single_4" href="images/4-big.jpg" title="New zealand beach"><img src="images/4.jpg" alt="Beach" /></a></li>
<li><a id="single_5" href="images/5-big.jpg" title="Sonning river"><img src="images/5.jpg" alt="River" /></a></li>
<li><a id="single_6" href="images/6-big.jpg" title="Steaming post in the morning sun"><img src="images/6.jpg" alt="steaming post" /></a></li>
<li><a id="single_7" href="images/7-big.jpg" title="Portrait lady"><img src="images/7.jpg" alt="Portrait of lady" /></a></li>
<li><a id="single_8" href="images/8-big.jpg" title="A great day at the coast"><img src="images/8.jpg" alt="Dog running along beach" /></a></li>
<li><a id="single_9" href="images/9-big.jpg" title="Jam hut in new zealand"><img src="images/9.jpg" alt="Jam hut in new zealand" /></a></li>
<li><a id="single_10" href="images/10-big.jpg" title="New zealand lake"><img src="images/10.jpg" alt="new zealand lake" /></a></li>
<li><a id="single_11" href="images/11-big.jpg" title="Full speed ahead"><img src="images/11.jpg" alt="Dog running" /></a></li>
<li><a id="single_12" href="images/12-big.jpg" title="Portsmouth docks"><img src="images/12.jpg" alt="Portsmouth docks" /></a></li>
<li><a href="#"><img src="images/13.jpg" alt="image13" /></a></li>
<li><a href="#"><img src="images/14.jpg" alt="image14" /></a></li>
<li><a href="#"><img src="images/15.jpg" alt="image15" /></a></li>
<li><a href="#"><img src="images/16.jpg" alt="image16" /></a></li>
<li><a href="#"><img src="images/17.jpg" alt="image17" /></a></li>
<li><a href="#"><img src="images/18.jpg" alt="image18" /></a></li>
<li><a href="#"><img src="images/19.jpg" alt="image19" /></a></li>
<li><a href="#"><img src="images/20.jpg" alt="image20" /></a></li>
</ul>
</div>
</div>
</div>
</body>
</html> -
Need help with inserting rows in ResultSet and JTable
hello Guru!
i have inserted a row in my result set and i want that my table shows this row promptly after i have inserted it in my result set...
but when i use following code for my resultset:
rs.moveToInsertRow();
rs.updateInt(1,nr);
rs.updateString(2, name);
rs.insertRow();
Record are inserted in resultset and database but not shown in my JTable??
Anyone a Clue to without reexecuting the query how can i display inserted row in JTable
http://download-west.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/resltse7.h
I have refrered the following links but still clue less help Guruuuuuuu
i m really in trobble??????i am just near by the Solution using the Database Metadata
by couldn't get the ideaaaa
==================================================
http://download-west.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/resltse7.htm
Seeing Database Changes Made Internally and Externally
This section discusses the ability of a result set to see the following:
its own changes (DELETE, UPDATE, or INSERT operations within the result set), referred to as internal changes
changes made from elsewhere (either from your own transaction outside the result set, or from other committed transactions), referred to as external changes
Near the end of the section is a summary table.
Note:
External changes are referred to as "other's changes" in the Sun Microsystems JDBC 2.0 specification.
Seeing Internal Changes
The ability of an updatable result set to see its own changes depends on both the result set type and the kind of change (UPDATE, DELETE, or INSERT). This is discussed at various points throughout the "Updating Result Sets" section beginning on , and is summarized as follows:
Internal DELETE operations are visible for scrollable result sets (scroll-sensitive or scroll-insensitive), but are not visible for forward-only result sets.
After you delete a row in a scrollable result set, the preceding row becomes the new current row, and subsequent row numbers are updated accordingly.
Internal UPDATE operations are always visible, regardless of the result set type (forward-only, scroll-sensitive, or scroll-insensitive).
Internal INSERT operations are never visible, regardless of the result set type (neither forward-only, scroll-sensitive, nor scroll-insensitive).
An internal change being "visible" essentially means that a subsequent getXXX() call will see the data changed by a preceding updateXXX() call on the same data item.
JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
boolean ownDeletesAreVisible(int) throws SQLException
boolean ownUpdatesAreVisible(int) throws SQLException
boolean ownInsertsAreVisible(int) throws SQLException
Note:
When you make an internal change that causes a trigger to execute, the trigger changes are effectively external changes. However, if the trigger affects data in the row you are updating, you will see those changes for any scrollable/updatable result set, because an implicit row refetch occurs after the update.
Seeing External Changes
Only a scroll-sensitive result set can see external changes to the underlying database, and it can only see the changes from external UPDATE operations. Changes from external DELETE or INSERT operations are never visible.
Note:
Any discussion of seeing changes from outside the enclosing transaction presumes the transaction itself has an isolation level setting that allows the changes to be visible.
For implementation details of scroll-sensitive result sets, including exactly how and how soon external updates become visible, see "Oracle Implementation of Scroll-Sensitive Result Sets".
JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
boolean othersDeletesAreVisible(int) throws SQLException
boolean othersUpdatesAreVisible(int) throws SQLException
boolean othersInsertsAreVisible(int) throws SQLException
Note:
Explicit use of the refreshRow() method, described in "Refetching Rows", is distinct from this discussion of visibility. For example, even though external updates are "invisible" to a scroll-insensitive result set, you can explicitly refetch rows in a scroll-insensitive/updatable result set and retrieve external changes that have been made. "Visibility" refers only to the fact that the scroll-insensitive/updatable result set would not see such changes automatically and implicitly.
Visibility versus Detection of External Changes
Regarding changes made to the underlying database by external sources, there are two similar but distinct concepts with respect to visibility of the changes from your local result set:
visibility of changes
detection of changes
A change being "visible" means that when you look at a row in the result set, you can see new data values from changes made by external sources to the corresponding row in the database.
A change being "detected", however, means that the result set is aware that this is a new value since the result set was first populated.
With Oracle8i release 8.1.6 and higher, even when an Oracle result set sees new data (as with an external UPDATE in a scroll-sensitive result set), it has no awareness that this data has changed since the result set was populated. Such changes are not "detected".
JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
boolean deletesAreDetected(int) throws SQLException
boolean updatesAreDetected(int) throws SQLException
boolean insertsAreDetected(int) throws SQLException
It follows, then, that result set methods specified by JDBC 2.0 to detect changes--rowDeleted(), rowUpdated(), and rowInserted()--will always return false with the 8.1.6 Oracle JDBC drivers. There is no use in calling them.
Summary of Visibility of Internal and External Changes
Table 12-1 summarizes the discussion in the preceding sections regarding whether a result set object in the Oracle JDBC implementation can see changes made internally through the result set itself, and changes made externally to the underlying database from elsewhere in your transaction or from other committed transactions.
Table 12-1 Visibility of Internal and External Changes for Oracle JDBC
Result Set Type Can See Internal DELETE? Can See Internal UPDATE? Can See Internal INSERT? Can See External DELETE? Can See External UPDATE? Can See External INSERT?
forward-only
no
yes
no
no
no
no
scroll-sensitive
yes
yes
no
no
yes
no
scroll-insensitive
yes
yes
no
no
no
no
For implementation details of scroll-sensitive result sets, including exactly how and how soon external updates become visible, see "Oracle Implementation of Scroll-Sensitive Result Sets".
Notes:
Remember that explicit use of the refreshRow() method, described in "Refetching Rows", is distinct from the concept of "visibility" of external changes. This is discussed in "Seeing External Changes".
Remember that even when external changes are "visible", as with UPDATE operations underlying a scroll-sensitive result set, they are not "detected". The result set rowDeleted(), rowUpdated(), and rowInserted() methods always return false. This is further discussed in "Visibility versus Detection of External Changes".
Oracle Implementation of Scroll-Sensitive Result Sets
The Oracle implementation of scroll-sensitive result sets involves the concept of a window, with a window size that is based on the fetch size. The window size affects how often rows are updated in the result set.
Once you establish a current row by moving to a specified row (as described in "Positioning in a Scrollable Result Set"), the window consists of the N rows in the result set starting with that row, where N is the fetch size being used by the result set (see "Fetch Size"). Note that there is no current row, and therefore no window, when a result set is first created. The default position is before the first row, which is not a valid current row.
As you move from row to row, the window remains unchanged as long as the current row stays within that window. However, once you move to a new current row outside the window, you redefine the window to be the N rows starting with the new current row.
Whenever the window is redefined, the N rows in the database corresponding to the rows in the new window are automatically refetched through an implicit call to the refreshRow() method (described in "Refetching Rows"), thereby updating the data throughout the new window.
So external updates are not instantaneously visible in a scroll-sensitive result set; they are only visible after the automatic refetches just described.
For a sample application that demonstrates the functionality of a scroll-sensitive result set, see "Scroll-Sensitive Result Set--ResultSet5.java".
Note:
Because this kind of refetching is not a highly efficient or optimized methodology, there are significant performance concerns. Consider carefully before using scroll-sensitive result sets as currently implemented. There is also a significant tradeoff between sensitivity and performance. The most sensitive result set is one with a fetch size of 1, which would result in the new current row being refetched every time you move between rows. However, this would have a significant impact on the performance of your application.
how can i implement this using
JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
boolean deletesAreDetected(int) throws SQLException
boolean updatesAreDetected(int) throws SQLException
boolean insertsAreDetected(int) throws SQLException -
Is this too much chained rows ? How to prevent chained rows ?
Hi,
Due to performance issue on my database, I came across "Chained/migrated Rows articles" ... and ran script to check chained rows .....
I have chained rows in 2 tables but only one is worth mention. It is a table that has 50 CLOB columns and has 1.1mil records .....
After running the script for chained rows I get 500.000 chained rows out of this 1.1mil ....
I will now do as explaind in the forums and books, reinsert this rows ..... to try fix this
So my question would be, what do i need to do to prevent , if I actually can anything at all to not get so many chained rows ? I understand that some rows can't be prevented to have chains ...
Database block is 8192 ..... Avarage row length(stats) of this table is 6093, est.size 8.9G .... PCTFree is 10 by default ...
At this moment i'm getting warning :"PCTFREE too low for a table" and is at 1.3...
Do I need to increase database block and/or increase PCTFree to some range between 20-25? If yes, can i somehow increase block only on this table cause recreating database that is 79GB would take some time ...?
Performance is big issue, disk space is not ...
Thank you.
Krisuser10702996 wrote:
The whole insert row contains data about one newspaper article ..... So what we did for better search performances is to "cache" every word from this article into defined CLOB column but ordered by first character ... so words staring with A are in CHAR_1 clob column B is in CHAR_B and so on ....
How are you querying the data ?
From your description, it looks as if you need to look at Oracle's "text" indexing - I am basing this comment on the assumption that you are trying to do things like: "find all articles that reference aardvarks and zebras", and turning this into a search of the "A lob" and the "Z lob" of every row+ in the table. (I'm guessing that your biggest performance problem is actually the need to examine every row, rather than the problem of chained rows - obviously I may be wrong).
If you use context (or intermedia, the name changes with version) you need only store the news item once as a LOB then create a text index on it - leaving Oracle to build supporting structures that allow you to run such queries fairly efficiently.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan -
HI
I have some chained rows in some of may table . I have exported, trunacte, import back the data in the table.Then collect the stats.
But i have the same Chained_count. Nothing has change.This is a small table(around 52 k), no long,raw datatype in the table.I am ruuning Oracle 10gR2
Any ideas?
regards,
FabriceHemant K Chitale wrote:
For such a generic question, is there a difference between 10gR2 and 10.2.0.4 ?
BTW, is 10.2.0.4 a "Version" ? I would say yes, it is a version (or more accurately, 10.2.0.4.0), at least to Oracle it is considered a "version."
SQL > SELECT * FROM PRODUCT_COMPONENT_VERSION where PRODUCT like 'Oracle%';
PRODUCT VERSION STATUS
Oracle Database 10g Enterprise Edition 10.2.0.4.0 ProdI was trying to be consistent, as well as other forum users, with what Oracle considers a version. The SQL statement above is one example. Another is if you look at the [CPU Jan 2009 information|http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujan2009.html] Oracle has this listed under Category I:
Oracle Database 10g Release 2, versions 10.2.0.2, 10.2.0.3, 10.2.0.4Either way I don't want to hijack this thread and get into a semantics discussion. I had no intention in my original post of being condescending or anything of that nature when requesting the version information. Some times, as you probably know, there are bugs from version to version that may make this a pertinent question to ask.
Thanks! :) -
Migrated/chained rows causing double I/O
" You have 3,454,496 table fetch continued row actions during this period. Migrated/chained rows always cause double the I/O for a row fetch and "table fetch continued row" (chained row fetch) happens when we fetch BLOB/CLOB columns (if the avg_row_len > db_block_size), when we have tables with > 255 columns, and when PCTFREE is too small. You may need to reorganize the affected tables with the dbms_redefintion utility and re-set your PCTFREE parameters to prevent future row chaining.
What is migration and row chaining and when does this happen?
Is there a query to find out affected tables? i.e migrated and chained rows?
Is there a query to find out tables whos pctfree size is small?
How to determine the optimal value for pctfree for these affected tables/user3390467 wrote:
" You have 3,454,496 table fetch continued row actions during this period. Migrated/chained rows always cause double the I/O for a row fetch and "table fetch continued row" (chained row fetch) happens when we fetch BLOB/CLOB columns (if the avg_row_len > db_block_size), when we have tables with > 255 columns, and when PCTFREE is too small. You may need to reorganize the affected tables with the dbms_redefintion utility and re-set your PCTFREE parameters to prevent future row chaining.
This is one of the better observations that you can get from the Statspack Analyzer. It would be helpful, though if it compared the number of continued fetches with the number of rows fetched by rowid and rows fetched by tablescan to produce some idea of the relative impact of the continued fetches.
It is possible that this advice is a waste of space, though --- and we can't tell because (a) we don't know how long the interval was, and (b) we don't know where your system spent its time.
If you care to post your statspack report, we might be able to give you some suggestions of the issues that are worth addressing. If you choose to do this (a) you may want to edit some of the text to make the report anonymous (database name, instance name, components of filenames, all but the first few words of each "SQL ordered by" statement).
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."
Stephen Hawking -
Hi,
i have listed out the chained rows from my database. The result is given bloow...
TABLE_NAME ROW_COUNT
MCGZC01_CALLSLOG 19
MCGZT01_DLERINVHED 358
MCGZT06_AVLPMSCOUP 5656
MCGZT07_ADHOCPOINT 560
MCGZT08_EXDWARRDET 8
MCGZT09_POINTSTRAN 44158
MCGZT01_DLERINVHED_OLD 138
To avoid this chainned and migrated rows what i have to do?.... Is thare any specific value to find out the criticality?... bacaues for table MCGZC01_CALLSLOG the row counrt is 19 and for MCGZT06_AVLPMSCOUP row count is 5656. what is mean row count?....Please explain me ...
Regards,
KarthikNo, I am not sure. I have not received
any feedback from users. I think they may not know
about the performance of the query and response time
of the query because they are working from web
application.... Hmmm, I think users always complain irregardless of client server or web app if things are going slowly. So listen to your users and tune the problems they have.
OK speaking about chained rows of course oracle docs can be consulted :
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm
Search for chain in this page.
And here is a small example when chained rows really affect performance:
let's create a table with large varchar2 column and populate initially with a tiny value. And then scan all the table using via index scan and let's look what is statistic for table fetch continued row.
SQL> create table t (
2 id number primary key,
3 a varchar2(4000));
Table created.
Elapsed: 00:00:00.02
SQL> insert into t select rownum, 'a' from all_objects;
54999 rows created.
Elapsed: 00:00:03.04
SQL> select * from v$statname where upper(name) like '%CONTIN%';
STATISTIC# NAME CLASS STAT_ID
252 table fetch continued row 64 1413702393
Elapsed: 00:00:00.00
SQL> select * from v$mystat where STATISTIC# = 252;
SID STATISTIC# VALUE
104 252 65
Elapsed: 00:00:00.00
SQL> declare
2 g varchar2(4000);
3 begin
4 for i in (select id from t) loop
5 select a into g from t where id = i.id;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:02.04
SQL> select * from v$mystat where STATISTIC# = 252;
SID STATISTIC# VALUE
104 252 65
Elapsed: 00:00:00.00OK the value is 65 and anonymous block took 2.04 secs to run.
Now let's update the table to expand the row and see how much now takes the same anonymous block
SQL> update t set a = lpad(a, 4000, a);
54999 rows updated.
Elapsed: 00:00:34.05
SQL> commit;
Commit complete.
Elapsed: 00:00:00.00
SQL> select * from v$mystat where STATISTIC# = 252;
SID STATISTIC# VALUE
104 252 65
Elapsed: 00:00:00.00
SQL> declare
2 g varchar2(4000);
3 begin
4 for i in (select id from t) loop
5 select a into g from t where id = i.id;
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:17.09
SQL> select * from v$mystat where STATISTIC# = 252;
SID STATISTIC# VALUE
104 252 55063
Elapsed: 00:00:00.00
SQL> So it took 17.09 secs and value for table fetch continued row has bumped way up.
BUT
This was arbitrary exterme created case, this is not normal scenario. If you know this will be your scenario you'll need to adjust pctfree parameter accordingly to avoid that.
And realtively small number of chained rows won't affect your table reads by rowid and rememeber that full scans are not affected at all, because oracle reads all the table anyway and chained rows don't matter at all in this case.
Gints Plivna
http://www.gplivna.eu -
Problem with Current row of a VO???
I have a Advanced table region in which i add many rows..and i get the data in to it from the lov page (lov mappings).
for each row i add... i have to set a item in main page table region doing some validations the data i get from lov region.
with examples..more detailed..
i have paymentAmount and AllocAmount...i get the payment Amount from LOV...after doing some validation on paymnetAmount i have to set the same value to the AllocAmount.
ARTransactionLine is the VO which contains the above mentioned attributes....and advanced table i mentioned above is based on this VO.
for this purpose im using the following code..
ARTransactionLineVOImpl
vo=(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.getCurrentRow();
payment_amount = TransDetailsVORow.getPaymentAmount();/*for this paymentAmount i made a lov mapping..so that currentrow contains the value of paymnetAmount from lov page*/
if(/* some validation*/){
TransDetailsVORow.setAllocAmount(payment_amount);
now when i do this ..for the first row it is working fine...but for the second row it is failing...getCurrentRow() is giving the values of previous row..not the current row...
first of all what does this getCurrentRow return???
help me ...n tell me where i was wrong...I m sure you have not gone through the tutorials completely.
ARTransactionLineVOImpl vo =(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.getCurrentRow();
with this row i am doing the below opeations..
Number x=TransDetailsVORow.getPaymentAmount();
/* some validations*/
TransDetailsVORow.setAllocAmount(x);
Change to
ARTransactionLineVOImpl vo =(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.first();
while (TransDetailsVORow!=null)
Number x=TransDetailsVORow.getPaymentAmount();
/* some validations*/
TransDetailsVORow.setAllocAmount(x);
TransDetailsVORow = (ARTransactionLineVORowImpl)vo.next();
Tapash -
Do you understand me ? I want money back.Because I have problem with LINE In App Purchase.And no one try to resolve this problem.And the answer of NEVER LINE JAPAN they don't have responsibility.I think it will be effect with APPLE image also.I want you to help me everyways to refound my monet back.Could you?
Contact iTunes Store Support.
-
Creating a list with different row sizes...
I'm new to AS 3.0 and CS4 and I've been getting up to speed
on all of it. I've used the List component before with my own
CellRenderer. I now need to create a list with different row
heights. The List component is great and does everything that I
want but it requires all rows to be the same height.
I'm unsure of where to go. Creating my own class seems like a
lot of work. The TileList and Grid components don't allow different
sized (and dynamically changing) row heights either. Is there some
base class (SelectableList? BaseScrollPane?) that I should extend
or do I need to just bite the bullet and write it all from scratch?
I need each row to have it's own height and interaction with
a row could change the height of the row. The main use is a list of
data. If the user clicks in an item, it turns the display into
something they can edit (which will need more height).
Thanks for any thoughts on a direction I should think about.
By the way, I really like that AS 3.0 is much more consistent of a
programming language than previous MX versions that I've used.
We're doing a lot of AS/Flash/AIR work with it and it's turning
into a wonderful environment...Any ideas about this??
-
Microsoft Visual Basic 2010 Express.
I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
when passed DataRow collection with deleted rows".
I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
the previous uploads and all the rows that i wanted to delete are still there.
My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller. IF the customer
needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.
Im not sure if i am making this overcomplicated or if there is a easier way to program this.
CODE:
Private Function LoadOffSetData()
Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
LoadOffsetDialog.DefaultExt = "csv"
LoadOffsetDialog.Filter = "csv|*.csv"
LoadOffsetDialog.Title = "Load Offset Data"
LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then 'show the dialog and if the result is ok then
Try
Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
If (myStream IsNot Nothing) Then 'if the file is valid
For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
oldRow.Delete()
'delete all of the existing rows
Next
'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
Dim rowvalue As String
Dim cellvalue(25) As String
'Reading CSV file content
While myStream.Peek() <> -1
Dim NRow As MaterionOffsetDataSet.OffsetTableRow
rowvalue = myStream.ReadLine()
cellvalue = rowvalue.Split(","c) 'check what is ur separator
NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
Me.OffsetTableTableAdapter.Update(NRow)
End While
Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue 'saves all the table offsets
to the offset numericUpDown registers in the main window
StationOffset01.Value = OffsetTableTableAdapter.Station01Value
StationOffset02.Value = OffsetTableTableAdapter.Station02Value
myStream.Close() 'close the stream
Return True
Else 'if we were not able to open the file then
MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
Return False
End If
Catch ex As Exception
MsgBox("Unable to load, " + ex.Message)
Return False
End Try
Else
Return False
End If
End FunctionHello SaulMTZ,
>>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
This error usually shows that you do not initialize the
DeleteCommand object, you could check this
article to see if you get a workaround.
>> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
which seems to be easier (in my opinion).
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Empty report with pagination, rows not displayed
Dear HTML DB Team,
We have in our reports the next error: An empty report with pagination appears , no rows not displayed
The test case to reproduce the error:
1. Create "SQL report" with next report attributes in "Layout and Pagination"
a. Row ranges 1-15 16-30 in select list (with pagination)
b. Number of Rows : 15
c. Number of Rows (Item): empty
d. Max Row Count: empty
2. Fill the table on which the report is based with 17 rows
3. Go to the 2nd page of the report , pagination rows 16-17 of 17
4. Remove 2 rows from the table, refresh report
5, The pagination shows now 1 - 15 of 15 rows
- no rows displayed
- no "previous button" ( only )
- no way to get the rows displayed, except logging out and in again
Any suggestions?
ErikHello,
i encountered the same problem while developing in HTMLDB.
In application builder, i select application Application 106, then click on items, then click next ( the application has 22 global items). Now i want to take a look at the global items in application 105 (there are only 5). In the menu i click Builder - Application 106, select application 105 from Available Applications, click Go and Items. It shows no rows, but says that is displaying rows 1-5, and offers a Next button. No way to see/modify the items unless make a new session or go back to Application 106, Click Previous to see the first page of global items and then again switch to Appication 105 or click to the next button and then manually set pg_min_row=1 in URL.
One more question - is this forum the right place to report bug suspicions, or is there some other special place for that?
Best regards,
Andres -
How can i create a grid with summary row
Hello Professionals,
I'm wondering how could i create a grid like the grid below, i want to create a grid with summary row,
i have tried to create it using collapsing but it didn't work as required.
Any suggestions?, i want to know just the starting point so i can make deep investigations.
Thanks in Advance,Hi Karem,
this can be achieved by just assigning a datatable containing the data plus some formatting of grid. Meaning there is no feature for that.
The datatable can be filled manually or by sql query. Then you have to attach some events for updating the values ( validate after for gid item ).
A small example for a sql query showing last month quotations and orders with summary :
select 1 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from OQUT where DocDate between DATEADD(month, -1, GETDATE()) AND GETDATE()
UNION ALL
Select 2 as Sort,'Summary ( Quotation ) : ',sum(DocTotal), convert(varchar, DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar, GETDATE(),104) from OQUT where DocDate between DATEADD(month, -1, GETDATE()) AND GETDATE()
UNION ALL
select 3 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from ORDR where DocDate between DATEADD(month, -1, GETDATE()) AND GETDATE()
UNION ALL
Select 4 as Sort,'Summary ( Order ) : ',sum(DocTotal), convert(varchar, DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar, GETDATE(),104) from ORDR where DocDate between DATEADD(month, -1, GETDATE()) AND GETDATE()
ORDER by Sort
regards,
Maik
Maybe you are looking for
-
I can make the groups but the problem happens when i close firefox and open again.
-
Drawing with a custom profile stroke is not working for me. Does it work for you?
Drawing with a custom profile stroke is not working for me. Does it work for you? I can only apply it on an existing stroke but can't draw a new one with the selected profile. In fact if I change the profile to other than the default Uniform I also c
-
Photos, Camera Roll, and PhotoStream
I deleted a photo from Photos and PhotoStream on my iPad the other day. Then I went to iPhoto on my Mac and deleted the same photo from multiple PhotoStreams there. Then, a while later, figuring I had deleted the photo everywhere...when I was checkin
-
New In Java.....
Hi, I'm a Lotus based programmer and just started to learn Java few month ago. After the few month self-study, I found that there are too many classes and interface to remembers. I'm having a hard time to remembers all the classes. I have few questio
-
Premiere Elements 8 Rendering Issues
I have been editing a HD file of approx 12Gb and am in the stage of fine tuning the clips. My problem is that after adding a transition effect and trying to render I come up with 2 seperate error messages The first one is [..\..\Scr\PathUtils.cpp-190