Table in vertical direction?
Hi All,
I'd like to know if we can display a table in vertical direction: the table is rotated 90 degree anticlockwise, so the visual effect is the the rows becomes columns? Example:
Item1 Item2 ...
Header1 1 -2
Header2 yes no
Header3 true false
Now each new Node element will add a "column" to the table. This is especially useful if the table is used for comparison reason: most of us compare things by putting them from left to right for comparison, not from top to bottom.
Unfortunately I could not find anything about this topic, hope someone can help here. Thanks very much!
Best regards,
Ge
In a purely read-only scenario, you can achieve this layout by programatically creating the view.
Suppose you have a context structure like this:
Items (node, 0:N)
-- name (string)
-- amount (integer)
Then the following code (note: this is for NW 7.1, for earlier versions, you have to add a cast here and there) creates the wanted layout:
public static void wdDoModifyView(IPrivateTableRotatedCompView wdThis, IPrivateTableRotatedCompView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
//@@begin wdDoModifyView
if (firstTime || wdContext.currentContextElement().getItemsChanged())
IWDTransparentContainer grid = (IWDTransparentContainer) view.getElement("Grid");
// Headers
IWDInvisibleElement emptyCell = view.createElement(IWDInvisibleElement.class);
grid.addChild(emptyCell);
emptyCell.createLayoutData(IWDMatrixHeadData.class);
for (int i = 0; i < wdContext.nodeItems().size(); ++i)
IWDTextView columnHeader = view.createElement(IWDTextView.class);
columnHeader.setDesign(WDTextViewDesign.EMPHASIZED);
columnHeader.setText("Item " + i);
grid.addChild(columnHeader);
// Row 1: item names
IWDTextView rowHeader = view.createElement(IWDTextView.class);
grid.addChild(rowHeader);
IWDMatrixHeadData layoutData = rowHeader.createLayoutData(IWDMatrixHeadData.class);
rowHeader.setDesign(WDTextViewDesign.EMPHASIZED);
rowHeader.setText("Header1");
for (int i = 0; i < wdContext.nodeItems().size(); ++i)
IItemsElement item = wdContext.nodeItems().getItemsElementAt(i);
IWDTextView name = view.createElement(IWDTextView.class);
grid.addChild(name);
name.setText(item.getName());
// Row 2: item amounts
IWDTextView rowHeader = view.createElement(IWDTextView.class);
grid.addChild(rowHeader);
IWDMatrixHeadData layoutData = rowHeader.createLayoutData(IWDMatrixHeadData.class);
rowHeader.setDesign(WDTextViewDesign.EMPHASIZED);
rowHeader.setText("Header2");
for (int i = 0; i < wdContext.nodeItems().size(); ++i)
IItemsElement item = wdContext.nodeItems().getItemsElementAt(i);
IWDTextView amount = view.createElement(IWDTextView.class);
grid.addChild(amount);
amount.setText(String.valueOf(item.getAmount()));
wdContext.currentContextElement().setItemsChanged(false);
//@@end
Armin
Similar Messages
-
How to set the text of a cell in Numbers to vertical direction? Tks.
Hi
In Numbers, please tell me how to switch the text of a cell to vertical direction?
Tks.Hi Kyle,
In Numbers, nothing having to do with a table can be rotated. (In Pages an entire Table can be rotated, but not text within a Table.)
There have been many suggestions posted here over the life of iWork for vertical labels. Most fall into three categories:
1. Type one letter, Option-Return, type another letter, Option-Return, and so forth.
2. Type label in a Text Box, rotate the box, position the box over the table, covering the cell where you need a label.
3. Create a PDF graphic with rotated text and insert it into table cell as Background Fill.
The third option is clearly the best. The steps for option three are:
Insert Text Box
Type label into the box
Rotate the text box
Select the text box (not the text inside the box)
Command-C
Switch to Preview.app
Command-N
Command-C
Switch to Numbers
Click on Cell where the label goes
Command-V
It sounds worse than it is. You can reuse the Text Box so you don't end up with a sheet full of them.
Regards,
Jerry -
How to print fields in vertical direction ??
How to print data fields (not textitems or boilerplates) in vertical direction ??
hello,
we only support rotating objects of type boilerplate (text/graphic).
regards,
the oracle reports team --pw -
i dropped my iphone yesterday on its backside from my computer desk to floor.the distance is about 50cm. and it has a phone case. it did't work any vertical direction lock .then i restarted my phone, it recovered.but i am not sure is it ok ?
Good job with trying the two-button reset, that would have been my first advice for you. Next, I suggest you take the reset/update a step further. This step may risk losing the data on your phone, but since it's not working already, there may be no other solution.
On your computer, make sure you have internet acces and the latest version of iTunes installed.
Launch iTunes and connect the iPhone
Press and hold both sleep/wake and home buttons
After ten seconds, only release the sleep/wake button.
If you were successful, the iPhone screen should stay dark and the computer should display a popup.
If you see a message saying "iTunes has detected a device in recovery mode," then continue by clicking yes to each subsequent popup.
If the iPhone displays the silver Apple logo start over with step three of these instructions. -
Can table cell vertical alignment be defined via CSS?
In a table cell (ie, "td") is there a way to define "valign" via CSS, instead of the table cell proper?
In other words, instead of...
<table>
<tr>
<td valign="top">
...is it possible to do :
<table>
<tr>
<td class="top">
...and somehow let the stylesheet define the vertical alignment?
I'm asking because none of the attribute presets in Dreamweaver CS4 seem to provide for vertical alignment. Everything else on God's green earth seems to be there, but table cell vertical alignment seems to be the ONLY thing CSS forgot about.How about giving the class "top": text-align:center. Or even the tag "td" in your stylesheet. Does that help?
John -
Can I center the text in vertical direction in JTextArea
for example , if the JTextArea is 50 pixels high, and the text 's height is 20 pixels,
then how can I center the text in vertical direction in this JTextArea which means
there is a extra space whose height is 15 pixels over and under the text?Exactly what are you trying to do?
JTextAreas are usually in a scroll pane, you add multiple lines ie height can change
are you going to make it uneditable etc
if it is just for a display (uneditable), perhaps a 'tall' JTextField might give you the desired effect -
How to write internal table data vertically . Records vertically.
Hi pals,
How to write internal table records vertically .
suppose the records are
a1 a2 a3
b1 b2 b3
we need to display
a1 b1
a2 b2
a3 b3
Thanks in advance.
balaji.TJust check the code
DATA: BEGIN OF itab OCCURS 0,
f1 TYPE i,
f2 TYPE i,
f3 TYPE i,
END OF itab.
DATA pos TYPE i.
"Define your lines where you want to print here...
DATA line1 TYPE i VALUE 10.
DATA line2 TYPE i VALUE 12.
DATA line3 TYPE i VALUE 14.
itab-f1 = '1'.
itab-f2 = '10'.
itab-f3 = '100'.
APPEND itab.
itab-f1 = '2'.
itab-f2 = '20'.
itab-f3 = '200'.
APPEND itab.
itab-f1 = '3'.
itab-f2 = '30'.
itab-f3 = '300'.
APPEND itab.
itab-f1 = '4'.
itab-f2 = '40'.
itab-f3 = '400'.
APPEND itab.
loop at itab.
write : / itab-f1,itab-f2,itab-f3.
endloop.
LOOP AT itab.
pos = pos + 10.
SKIP TO LINE line1.
POSITION pos.
WRITE itab-f1.
SKIP TO LINE line2.
POSITION pos.
WRITE itab-f2.
SKIP TO LINE line3.
POSITION pos.
WRITE itab-f3.
ENDLOOP. -
Updating ARDT table without using direct update statement
hi,
can any one guide me how to update REMARK field in the ADRT table without using direct UPDATE statement. It would be helpful if any one can tell me the bapi or a function module with a sample code.Hi
<b>SZA0 Business Address Services (w/o Dialog) </b> ADDR_PERSONAL_UPDATE
ADDR_PERSON_UPDATE
ADDR_PERS_COMP_UPDATE
ADDR_UPDATE
these are the four function modules which will update the (Business Address Services) reward if usefull
check these is there any help ful for u or not -
How do i flip a layer in vertical direction through Coding?
Hi,
I would like to make a mirror effect for the foreground. so i have to flip a layer in vertical direction, by move the anchor position to the bottom center.
Could you please help me on this?
thanks,
rajiv.sIf I recall correctly both me & mike had a play about with a similar request over at PS Scripts… There may be something in this that you can utilise… In my case it was just for pretty much square on product stots…
#target photoshop
app.bringToFront();
var userRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var whiteRef = new SolidColor();
whiteRef.rgb.red = 255;
whiteRef.rgb.green = 255;
whiteRef.rgb.blue = 255;
var blackRef = new SolidColor();
blackRef.rgb.red = 0;
blackRef.rgb.green = 0;
blackRef.rgb.blue = 0;
app.backgroundColor = blackRef;
app.foregroundColor = whiteRef;
var docRef = app.activeDocument;
if (docRef.layers[0].isBackgroundLayer == false) {
if (docRef.layers[0].allLocked == true) docRef.layers[0].allLocked = false;
//if (docRef.layers[0].pixelsLocked == true) docRef.layers[0].pixelsLocked = false;
//if (docRef.layers[0].positionLocked == true) docRef.layers[0].positionLocked = false;
docRef.trim(TrimType.TRANSPARENT, true, true, true, true);
docWidth = docRef.width;
docHeight = docRef.height;
docRef.layers[0].duplicate();
docRef.resizeCanvas(docWidth, (docHeight * 2), AnchorPosition.TOPCENTER);
docRef.layers[1].translate(0, docHeight);
FlipLayer('Vrtc');
docRef.channels.add();
DrawGradient(docWidth*.5, docRef.height, docWidth*.5, docRef.height*.5, 50); //Adjust to tast
docRef.activeChannels = docRef.componentChannels;
docRef.resizeCanvas(docWidth + 50, (docHeight * 2) + 50, AnchorPosition.MIDDLECENTER);
docRef.layers[1].opacity = 75;
docRef.layers[1].blendMode = BlendMode.SCREEN;
docRef.selection.load(docRef.channels.getByName('Alpha 1'));
MakeLayerMask('RvlS');
docRef.channels.getByName('Alpha 1').remove();
SolidFillLayer(0, 0, 0);
docRef.layers[1].move(docRef.layers[2], ElementPlacement.PLACEAFTER);
app.preferences.rulerUnits = userRulerUnits;
function FlipLayer(direction) {
// direction = "Vrtc" or "Hrzn"
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
var desc01 = new ActionDescriptor();
var ref01 = new ActionReference(); ref01.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );
desc01.putReference(cTID('null'), ref01);
desc01.putEnumerated(cTID('Axis'), cTID('Ornt'), cTID(direction));
executeAction(cTID('Flip'), desc01, DialogModes.NO);
function MakeLayerMask(maskRef) {
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
// maskRef = RvlA, HdAl, RvlS, HdSl
var desc01 = new ActionDescriptor();
desc01.putClass(cTID('Nw '), cTID('Chnl'));
var ref01 = new ActionReference();
ref01.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Msk '));
desc01.putReference(cTID('At '), ref01 );
desc01.putEnumerated(cTID('Usng'), cTID('UsrM'), cTID(maskRef));
executeAction(cTID('Mk '), desc01, DialogModes.NO);
function DrawGradient(x1, y1, x2, y2, midPoint) {
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
var desc01 = new ActionDescriptor();
var desc02 = new ActionDescriptor();
desc02.putUnitDouble( cTID('Hrzn'), cTID('#Pxl'), x1 );
desc02.putUnitDouble( cTID('Vrtc'), cTID('#Pxl'), y1 );
desc01.putObject( cTID('From'), cTID('Pnt '), desc02 );
var desc03 = new ActionDescriptor();
desc03.putUnitDouble( cTID('Hrzn'), cTID('#Pxl'), x2 );
desc03.putUnitDouble( cTID('Vrtc'), cTID('#Pxl'), y2 );
desc01.putObject( cTID('T '), cTID('Pnt '), desc03 );
desc01.putEnumerated( cTID('Type'), cTID('GrdT'), cTID('Lnr ') );
desc01.putBoolean( cTID('Dthr'), true );
desc01.putBoolean( cTID('UsMs'), true );
var desc04 = new ActionDescriptor();
desc04.putString( cTID('Nm '), "Foreground to Background" );
desc04.putEnumerated( cTID('GrdF'), cTID('GrdF'), cTID('CstS') );
desc04.putDouble( cTID('Intr'), 4096.000000 );
var list15 = new ActionList();
var desc05 = new ActionDescriptor();
desc05.putEnumerated( cTID('Type'), cTID('Clry'), cTID('FrgC') );
desc05.putInteger( cTID('Lctn'), 0 );
desc05.putInteger( cTID('Mdpn'), midPoint );
list15.putObject( cTID('Clrt'), desc05 );
var desc06 = new ActionDescriptor();
desc06.putEnumerated( cTID('Type'), cTID('Clry'), cTID('BckC') );
desc06.putInteger( cTID('Lctn'), 4096 );
desc06.putInteger( cTID('Mdpn'), midPoint );
list15.putObject( cTID('Clrt'), desc06 );
desc04.putList( cTID('Clrs'), list15 );
var list16 = new ActionList();
var desc07 = new ActionDescriptor();
desc07.putUnitDouble( cTID('Opct'), cTID('#Prc'), 100.000000 );
desc07.putInteger( cTID('Lctn'), 0 );
desc07.putInteger( cTID('Mdpn'), 50 );
list16.putObject( cTID('TrnS'), desc07 );
var desc08 = new ActionDescriptor();
desc08.putUnitDouble( cTID('Opct'), cTID('#Prc'), 100.000000 );
desc08.putInteger( cTID('Lctn'), 4096 );
desc08.putInteger( cTID('Mdpn'), midPoint );
list16.putObject( cTID('TrnS'), desc08 );
desc04.putList( cTID('Trns'), list16 );
desc01.putObject( cTID('Grad'), cTID('Grdn'), desc04 );
executeAction( cTID('Grdn'), desc01, DialogModes.NO );
function SolidFillLayer(r, g, b) {
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
var desc616 = new ActionDescriptor();
var ref58 = new ActionReference();
ref58.putClass( sTID('contentLayer') );
desc616.putReference( cTID('null'), ref58 );
var desc617 = new ActionDescriptor();
var desc618 = new ActionDescriptor();
var desc619 = new ActionDescriptor();
desc619.putDouble( cTID('Rd '), r );
desc619.putDouble( cTID('Grn '), g );
desc619.putDouble( cTID('Bl '), b );
desc618.putObject( cTID('Clr '), cTID('RGBC'), desc619 );
desc617.putObject( cTID('Type'), sTID('solidColorLayer'), desc618 );
desc616.putObject( cTID('Usng'), sTID('contentLayer'), desc617 );
executeAction( cTID('Mk '), desc616, DialogModes.NO ); -
How to print filed value in vertical direction
I have some requirement to print the field value in vertical direction.How can I do that.
Hi,
you cannot rotate a field. But you can reference the field in a boilerplate text with &myfield_name and rotate the boilerplate. The value of the field inside the boilerplate is not shown, if you try the hide the field with a format trigger (as you normally don't want to show vertically and horizontally. Because of that, color your field white. So it's there, but not seen.
Regards
Rainer -
Serial table scan with direct path read compared to db file scattered read
Hi,
The environment
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
8K block size
db_file_multiblock_read_count is 128
show sga
Total System Global Area 1.6702E+10 bytes
Fixed Size 2219952 bytes
Variable Size 7918846032 bytes
Database Buffers 8724152320 bytes
Redo Buffers 57090048 bytes
16GB of SGA with 8GB of db buffer cache.
-- database is built on Solid State Disks
-- SQL trace and wait events
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true )
-- The underlying table is called tdash. It has 1.7 Million rows based on data in all_objects. NO index
TABLE_NAME Rows Table Size/MB Used/MB Free/MB
TDASH 1,729,204 15,242 15,186 56
TABLE_NAME Allocated blocks Empty blocks Average space/KB Free list blocks
TDASH 1,943,823 7,153 805 0
Objectives
To show that when serial scans are performed on database built on Solid State Disks (SSD) compared to Magnetic disks (HDD), the performance gain is far less compared to random reads with index scans on SSD compared to HDD
Approach
We want to read the first 100 rows of tdash table randomly into buffer, taking account of wait events and wait times generated. The idea is that on SSD the wait times will be better compared to HDD but not that much given the serial nature of table scans.
The code used
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_with_tdash_ssdtester_noindex';
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
/Server is rebooted prior to any tests
Whern run as default, the optimizer (although some attribute this to the execution engine) chooses direct path read into PGA in preference to db file scattered read.
With this choice it takes 6,520 seconds to complete the query. The results are shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1948310 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 2 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.84 4.03 320 48666 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.84 4.03 320 48666 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.84 4.03 320 48666 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.84 4.03 320 48666 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.01 0.00 1 52 2 1
Fetch 140 10.88 6519.89 194142805 194831110 0 130
total 278 10.91 6519.91 194142808 194831209 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 5 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_16394_test_with_tdash_ssdtester_noindex.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1531657 lines in trace file.
6520 elapsed seconds in trace file.I then force the query not to use direct path read by invoking
ALTER SESSION SET EVENTS '10949 trace name context forever, level 1' -- No Direct path read ;In this case the optimizer uses db file scattered read predominantly and the query takes 4,299 seconds to finish which is around 34% faster than using direct path read (default).
The report is shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1944909 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.92 4.07 319 48625 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.92 4.07 319 48625 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.92 4.07 319 48625 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.92 4.07 319 48625 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.00 0.00 2 52 2 1
Fetch 140 143.44 4298.87 110348674 194491010 0 130
total 278 143.46 4298.88 110348678 194491109 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129763 0.01 17.50
Disk file operations I/O 3 0.00 0.00
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_26796_test_with_tdash_ssdtester_noindex_NDPR.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1357958 lines in trace file.
4299 elapsed seconds in trace file.I note that there are 1,517,504 waits with direct path read with total time of nearly 6,200 seconds. In comparison with no direct path read, there are 1,218,651 db file scattered read waits with total wait time of 3,770 seconds. My understanding is that direct path read can use single or multi-block read into the PGA. However db file scattered reads do multi-block read into multiple discontinuous SGA buffers. So it is possible given the higher number of direct path waits that the optimizer cannot do multi-block reads (contigious buffers within PGA) and hence has to revert to single blocks reads which results in more calls and more waits?.
Appreciate any advise and apologies for being long winded.
Thanks,
MichHi Charles,
I am doing your tests for t1 table using my server.
Just to clarify my environment is:
I did the whole of this test on my server. My server has I7-980 HEX core processor with 24GB of RAM and 1 TB of HDD SATA II for test/scratch backup and archive. The operating system is RHES 5.2 64-bit installed on a 120GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive.
Oracle version installed was 11g Enterprise Edition Release 11.2.0.1.0 -64bit. The binaries were created on HDD. Oracle itself was configured with 16GB of SGA, of which 7.5GB was allocated to Variable Size and 8GB to Database Buffers.
For Oracle tablespaces including SYS, SYSTEM, SYSAUX, TEMPORARY, UNDO and redo logs, I used file systems on 240GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive. With 4K Random Read at 53,500 IOPS and 4K Random Write at 56,000 IOPS (manufacturer’s figures), this drive is probably one of the fastest commodity SSDs using NAND flash memory with Multi-Level Cell (MLC). Now my T1 table created as per your script and has the following rows and blocks (8k block size)
SELECT
NUM_ROWS,
BLOCKS
FROM
USER_TABLES
WHERE
TABLE_NAME='T1';
NUM_ROWS BLOCKS
12000000 178952which is pretty identical to yours.
Then I run the query as brelow
set timing on
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_bed_T1';
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT
COUNT(*)
FROM
T1
WHERE
RN=1;
which gives
COUNT(*)
60000
Elapsed: 00:00:05.29
tkprof output shows
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.02 5.28 178292 178299 0 1
total 4 0.02 5.28 178292 178299 0 1
Compared to yours:
Fetch 2 0.60 4.10 178493 178498 0 1
It appears to me that my CPU utilisation is by order of magnitude better but my elapsed time is worse!
Now the way I see it elapsed time = CPU time + wait time. Further down I have
Rows Row Source Operation
1 SORT AGGREGATE (cr=178299 pr=178292 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178299 pr=178292 pw=0 time=42216 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 3 0.00 0.00
SQL*Net message from client 3 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1405 0.00 4.68
Your direct path reads are
direct path read 1404 0.01 3.40Which indicates to me you have faster disks compared to mine, whereas it sounds like my CPU is faster than yours.
With db file scattered read I get
Elapsed: 00:00:06.95
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 1.22 6.93 178293 178315 0 1
total 4 1.22 6.94 178293 178315 0 1
Rows Row Source Operation
1 SORT AGGREGATE (cr=178315 pr=178293 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178315 pr=178293 pw=0 time=41832 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
Disk file operations I/O 3 0.00 0.00
db file sequential read 1 0.00 0.00
db file scattered read 1414 0.00 5.36
SQL*Net message from client 2 0.00 0.00
compared to your
db file scattered read 1415 0.00 4.16On the face of it with this test mine shows 21% improvement with direct path read compared to db scattered file read. So now I can go back to re-visit my original test results:
First default with direct path read
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
CPU ~ 11 sec, elapsed ~ 6520 sec
wait stats
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
direct path read 1517504 0.05 6199.93
roughly 0.004 sec for each I/ONow with db scattered file read I get
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
CPU ~ 143 sec, elapsed ~ 4299 sec
and waits:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
roughly 17.5/129759 = .00013 sec for single block I/O and 3770.02/1218651 = .0030 for multi-block I/ONow my theory is that the improvements comes from the large buffer cache (8320MB) inducing it to do some read aheads (async pre-fetch). Read aheads are like quasi logical I/Os and they will be cheaper compared to physical I/O. When there is large buffer cache and read aheads can be done then using buffer cache is a better choice than PGA?
Regards,
Mich -
MS Word 2007 insert table with vertical scrollbar?
Hi all, what is the best way when creating a word report to display a table that has alot of rows. I am wondering if it somehow possible to have a table in Word that has say 10 rows shown to the user but also has a vertical scrollbar that the user can move up and down to see more data.
If not possible, can anyone think of a solution?
Best Regards,
GrantThanks for the replies. Gaurav k, i was toying with the idea of using Excel but since i have many rows, it would not be the best way to create a report. My report does not have to be printed, only asved hard copy. But i do have many tables in addition to graphs etc to view and therefore being able to look at a report that is easy on the eye initially and if faults were found, the user could then look further into the tables. ie perhaps scroll through the many rows.
-
Tab control list mode in vertical direction
I know the default tab control is list in horizontal direction , if i set the tab location to "Left" , the tab text also change it to vertical , how can i set it stay in horizontal direction
Message Edited by [email protected] on 01-02-2010 08:09 AMYou can't have them horizontally, and I don't remember ever seeing a single program in which they are, but you can achieve the same effect by hiding the tabs altogether and using a listbox to control which page you're displaying. In fact, if you have many tab pages, you may want to consider abandoning the tab control and moving each page into a separate VI. The tab is then replaced with a subpanel in which you display the current VI, based on the listbox. You can see an example of this design if you open the LabVIEW options dialog.
Try to take over the world! -
How to load data to a "clustered table" quickly? direct insert not work
We have a single hash clustered table whose size is 45G, and we used the command:
insert /*+ append */ into t_hashed as select * from source.
the source is about 30G, it takes a very long time(several days, and not yet completed).
I dumped the redo log, and find there are lots of redo info about the insert. I have thought it should create much redo as it is "direct path insert", but from the dump info I could say the direct path insert didn't take effect.Your assessment is correct. INSERT /*+ APPEND */ does not work with a hash clustered table.
If you think about how hash clusters work, and how direct load insert works, it should be clear to you why a direct load insert via the append hint can never work.
How hash clusters work (well, only the part that's relevant to the current discussion):
Initially, at creation time, the storage for the entire cluster is preallocated, based on the various cluster parameters you chose. Think about that. All the storage is allocated to the cluster.
How direct load works (well, only the part that's relevant to the current discussion):
Space already allocated to and used by the segment is ignored. Space is taken from free, unformatted blocks from above the high water mark.
So, hopefully it's clear how these features are incompatible.
Bottom line:
It doesn't work, there's no way around it, there's nothing you can do about it....
-Mark -
Error log table for LSMW-Direct input
Can any one tell me , What is the table for storing the error messages in LSMW-Direct input?
Regards,
Nageshfor LSMW-Direct input method you can use EXCUTE IN BACK GROUND. the job is running and see the job name in SM37 . after completion of your job , select you job name and press the SPOOL button there you can find the you job error log.
Maybe you are looking for
-
How do i add another 8gb to my itouch with already 8gb on it
how do i add another 8gb to my itouch witch has 8gb on it already
-
Ipod classic will not sync, help me!
Running OSX 10.6.8 Macbook 2,1 Itunes 10.6.3 160gb Ipod classic not sure which generation The ipod appears empty in Itunes, I sync my entire library of music and all podcasts, it appears to sync normally and after the sync is complete, i eject the ip
-
How can I stop and delete a download?
How can I stop and delete a download? Bought a TV episode - it came with both the HD and standard version. Only want the standard. Can't get the HD version to clear from my available downloads. Help!??!?
-
Using struts - jsp design question
Using struts. Have a JSP cust.jsp In it half of it is very specific to that page only. rest half is shown in this cust.jsp and another report.jsp too. want to implement this so that code can be re-used in the other one too. The way I have designed is
-
Calculation manager - error when importing .csc script
Hi everybody, I am using EPM 11.2.1 with an Oracle 11.2.0.2 repository. I am new to Calculation Manager in Planning and I have an issue again. Using Essbase's admin console I created a script: SET UPDATECALC OFF; SET AGGMISSG ON;; FIX ("FY11", "Curre