Index Used during Query Execution
I am facing a strange and I am unable to get the soulution I am trying out optimization of queries & using explain plan for tht I had analysed my tables
Query on the table was using index earlier on a databse... there is no change in db no new rows inserted nothing but now same query in not using Index wht could be the problem. I used hints as well but no use.
Please let me know wht should I do?
Are you saying that the same query on the same database with the same data and the same statistics has a different plan? Are you sure that nothing is different? Different version of the database? Different statistics?
Can you post the query?
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC
Similar Messages
-
Determine Partition usage during query execution
InfoCube is partitioned using 0CALMONTH from 2003 to 2011- (34 partitions, 4 partitions/year). However during query execution variable prompts are used for Fiscal year and posting period.
1) Is there a way to find out 0CALMONTH partition is used in this case ?
2) Is it possible to display or capture the number of partitions used during query execution ?InfoCube is partitioned using 0CALMONTH from 2003 to 2011- (34 partitions, 4 partitions/year). However during query execution variable prompts are used for Fiscal year and posting period.
1) Is there a way to find out 0CALMONTH partition is used in this case ?
2) Is it possible to display or capture the number of partitions used during query execution ? -
Invisible index getting accessed during query execution
Hello Guys,
There is a strange problem , I am encountering . I am working on tuning the performance of one of the concurrent request in our 11i ERP System having database 11.1.0.7
I had enabled oradebug trace for the request and generated tkprof out of it. For below query which is taking time , I found that , in the trace generated , wait event is "db file sequential read" on an PO_LINES_N10 index but in the generated tkprof , for the same below query , the full table scan for PO_LINES_ALL is happening , as that table is 600 MB in size.
Below is the query ,
===============
UPDATE PO_LINES_ALL A
SET A.VENDOR_PRODUCT_NUM = (SELECT SUPPLIER_ITEM FROM APPS.IRPO_IN_BPAUPDATE_TMP C WHERE BATCH_ID = :B1 AND PROCESSED_FLAG = 'P' AND ACTION = 'UPDATE' AND C.LINE_ID =A.PO_LINE_ID AND ROWNUM = 1 AND SUPPLIER_ITEM IS NOT NULL),
LAST_UPDATE_DATE = SYSDATE
===============
Index PO_LINES_N10 is on the column LAST_UPDATE_DATE , logically for such query , index should not have got used as that indexed column is not in select / where clause.
Also, why there is discrepancy between tkprof and trace generated for the same query .
So , I decided to INVISIBLE the index PO_LINES_N10 but still that index is getting accessed in the trace file .
I have also checked the below parameter , which is false so optimizer should not make use of invisible indexes during query execution.
SQL> show parameter invisible
NAME TYPE VALUE
optimizer_use_invisible_indexes boolean FALSE
Any clue regarding this .
Thanks and Regards,
Prasad
Edited by: Prasad on Jun 15, 2011 4:39 AMHi Dom,
Sorry for the late reply , but yes , an update statement is trying to update that index even if it's invisible.
Also, it seems performance issue started appearing when this index got created , so now I have dropped that index in test environment and ran the concurrent program again with oradebug level 12 trace enabled and found bit improvement in the results .
With index dropped -> 24 records/min got processed
With index -> 14 records/min got processed
so , I am looking forward without this index in the production too but before that, I have concerns regarding tkprof output. Can we further improve the performance of this query.
Please find the below tkprof with and without index .
====================
Sql statement
====================
UPDATE PO_LINES_ALL A SET A.VENDOR_PRODUCT_NUM = (SELECT SUPPLIER_ITEM FROM
APPS.IRPO_IN_BPAUPDATE_TMP C
WHERE
BATCH_ID = :B1 AND PROCESSED_FLAG = 'P' AND ACTION = 'UPDATE' AND C.LINE_ID =
A.PO_LINE_ID AND ROWNUM = 1 AND SUPPLIER_ITEM IS NOT NULL),
LAST_UPDATE_DATE = SYSDATE
=========================
TKPROF with Index for the above query ( processed 643 records )
=========================
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 2499.64 2511.99 98158 645561632 13105579 1812777
Fetch 0 0.00 0.00 0 0 0 0
total 2 2499.64 2511.99 98158 645561632 13105579 1812777
=============================
TKPROF without Index for the above query ( processed 4452 records )
=============================
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 10746.96 10544.13 84125 3079376156 1870058 1816289
Fetch 0 0.00 0.00 0 0 0 0
total 2 10746.96 10544.13 84125 3079376156 1870058 1816289
=============================
Explain plan which is same in both the cases
=============================
Rows Row Source Operation
0 UPDATE PO_LINES_ALL (cr=3079377095 pr=84127 pw=0 time=0 us)
1816289 TABLE ACCESS FULL PO_LINES_ALL (cr=83175 pr=83026 pw=0 time=117690 us cost=11151 size=29060624 card=1816289)
0 COUNT STOPKEY (cr=3079292918 pr=20 pw=0 time=0 us)
0 TABLE ACCESS BY INDEX ROWID IRPO_IN_BPAUPDATE_TMP (cr=3079292918 pr=20 pw=0 time=0 us cost=4 size=22 card=1)
180368800 INDEX RANGE SCAN IRPO_IN_BPAUPDATE_N1 (cr=51539155 pr=3 pw=0 time=16090005 us cost=3 size=0 card=1)(object id 372721)
There is a lot increase in the CPU ,so I would like to further tune this query. I have run SQL Tuning task but didn't get any recommendations for the same.
Since in the trace , I have got db scattered read wait event for the table "PO_LINES_ALL" but disk reads are not much , so am not sure the performance improvement even if I pin this table (620 MB in size and is it feasible to pin , SGA is 5GB with sga_target set ) in the shared pool .
I have already gathers stats for the concerned tables and rebuilt the indexes .
Is there any other thing that can be performed to tune this query further and bring down CPU, time taken to execute.
Thanks a lot for your reply.
Thanks and Regards,
Prasad
Edited by: Prasad on Jun 28, 2011 3:52 AM
Edited by: Prasad on Jun 28, 2011 3:54 AM
Edited by: Prasad on Jun 28, 2011 3:56 AM -
Finding number of working days during query execution
Hi ,
We have a requirement to calculate number of working days during query execution. In the cube we got "received date", this will be used as a variable in the query. Based on the received date value entered, query needs to display number of products received from past 1, 2,3,4 days (working days should include weekends or public holidays).
1day 2 days 3 days 4 days 5 days
10 12 20 15 20
to me it appears as I need to create virtual key figures.
Regards,
RamzHi ramesh,
First try to create formula variables for start data and end date to calculate the no of working days.
Create a Variable ZSTDT --of type replacement path.
Type of Variable = Formula
Variable Name = ZSTDT
Characteristic = <info object>
For Intervals Use = Select From Value
Offset Start = 0000 Offset Length = 0000
Replacement var with : key
use the same steps to create one more formula variable to get end date.
Now create a formula to get the No of days.
once after getting no of days you can create buckets as per your need.
for more info check the below links
http://www.sd-solutions.com/SAP-HCM-BW-Replacement-Path-Variables.html
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f15839-0cf1-2b10-c6a7-ebe68cc87cdc?quicklink=index&overridelayout=true -
F4 Help in Variable Screen during Query Execution
Hi All,
We are executing queries through WAD. The F4 help in the variable screen during query execution is taking a lot of time.
SAP note 661251 suggests changing the F4 mode to M. We need to change the booked value parameter.
I looked into the standard WAD web template but i'm not seeing any options/ooked value parameter.
Please suggest where I need to go to change the parameter. Thanks.
Regards,
VivekNot much experience in WAD but I think there should be a query in BEx Query Designer.
There you can choose that characteristics which takes time. Select "Advanced" tab from right hand side.
Under "Filter Value Selection During Query Execution" you will get 4 options.
BTW if you have a query on DSO then creating index ( secondary) on the affected characteristics would also resolve your problem
Regards
Anindya -
Change of Row Property during query execution possible?
Hello Experts,
is it possible to change the row property during query execution?
In the case an input ready IP query can be executed for different customers. Depending on the customer class (attribute of customer), a certain row (containing account data) should be input ready or only be shown, but not input ready.
How can this be achieved?
Thank you!
AngieHi Angie,
To determine the input readiness at Run time based on the master data value of a particular characteristic value (In your case Customer),
you can create data slice of type exit .
The data slice is based on an exit class. In the exit class, you can implement a customer-specific logic to protect data records.
Please refer to http://help.sap.com/saphelp_nw2004s/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
for more information.
By using this, the required rows will be shown but not input ready ( As per your requirement)
Hope this info helps. Or do let us know !!
Best regards,
Akshata -
30EA4 Problem using MySql: "Query execution was interrupted"
Any query executes the first time but a second execution always causes the error "Query execution was interrupted"
(Update: I just installed the prodcution release of sql delveloper 2.1.1.64.45 and have the same issue)
I am using MySql driver 5.1.15
Others seem to have a similar issue and I tries the older JDBC drivers but the 5.0.4 cause the connection to hang and the 5.0.8 caused the same problem "Query execution was interrupted"
Vendor Code 1317 Query execution was interrupted MySQL
I am using Windows7 64 bit (sql developer and jdk are 32 bit), see below
MySql version
-------------------------------------------------------+
| Variable_name | Value |
-------------------------------------------------------+
| innodb_version | 1.1.4 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.8 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86 |
| version_compile_os | Win64 |
-------------------------------------------------------+
SQL Develper Info:
About
Oracle SQL Developer 3.0.03
Version 3.0.03
Build MAIN-03.97
Copyright © 2005, 2011 Oracle. All Rights Reserved.
IDE Version: 11.1.1.4.37.59.36
Product ID: oracle.sqldeveloper
Product Version: 11.1.2.03.97
Version
Component Version
========= =======
Java(TM) Platform 1.6.0_24
Oracle IDE 3.0.03.97
Versioning Support 3.0.03.97
Properties
Name Value
==== =====
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.6.0_24; Windows 7 6.1 x86; en_IE) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 7381246437329
ide.build MAIN-03.97
ide.conf C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun true
ide.java.minversion 1.6.0_04
ide.launcherProcessId 2204
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.pref.dir.base C:\Users\mark\AppData\Roaming
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.startingcwd C:\Program Files (x86)\sqldeveloper
ide.user.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.vcs.noapplications true
ide.work.dir C:\Users\mark\Documents\SQL Developer
ide.work.dir.base C:\Users\mark\Documents
ilog.propagatesPropertyEditors false
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\endorsed
java.ext.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\Program Files (x86)\Java\jdk1.6.0_24\jre
java.io.tmpdir C:\Users\mark\AppData\Local\Temp\
java.library.path C:\Program Files (x86)\sqldeveloper;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\;C:\Program Files (x86)\Java\jdk1.6.0_24\bin;C:\Program Files (x86)\OpenVPN\bin;C:\tools\apache-maven-3.0.2\bin;C:\tools\mysql-5.5.8-winx64\bin
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.protocol.handler.pkgs oracle.jdevimpl.handler
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_24-b07
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_24
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 19.1-b02
jdbc.library /C:/Program Files (x86)/sqldeveloper/jdbc/lib/ojdbc6.jar
line.separator \r\n
log.file.name ..//log/datamodeler.log
oracle.home C:\Program Files (x86)\sqldeveloper
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.jdbc.mapDateToTimestamp false
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/Program Files (x86)/sqldeveloper/jlib/orai18n.jar
os.arch x86
os.name Windows 7
os.version 6.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sqldev.debug false
sun.arch.data.model 32
sun.boot.class.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\modules\jdk.boot.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\classes
sun.boot.library.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level
svnkit.sax.useDefault true
user.country IE
user.dir C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin
user.home C:\Users\mark
user.language en
user.name mark
user.timezone Europe/Paris
user.variant
windows.shell.font.languages
Extensions
Name Identifier Version Status
==== ========== ======= ======
Check For Updates oracle.ide.webupdate 11.1.1.4.37.59.36 Loaded
Code Editor oracle.ide.ceditor 11.1.1.4.37.59.36 Loaded
Component Palette oracle.ide.palette1 11.1.1.4.37.59.36 Loaded
Data Miner oracle.dmt.dataminer 11.2.0.1.9.96 Loaded
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.4.37.59.36 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.4.37.59.36 Loaded
Database UI oracle.ide.db 11.1.1.4.37.59.36 Loaded
Diagram Framework oracle.diagram 11.1.1.4.37.59.36 Loaded
Diagram Javadoc Extension oracle.diagram.javadoc 11.1.1.4.37.59.36 Loaded
Diagram Thumbnail oracle.diagram.thumbnail 11.1.1.4.37.59.36 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.4.37.59.36 Loaded
Extended IDE Platform oracle.javacore 11.1.1.4.37.59.36 Loaded
External Tools oracle.ide.externaltools 11.1.1.4.37.59.36 Loaded
File Support oracle.ide.files 11.1.1.4.37.59.36 Loaded
Help System oracle.ide.help 11.1.1.4.37.59.36 Loaded
History Support oracle.jdeveloper.history 11.1.1.4.37.59.36 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.4.37.59.36 Loaded
Index Migrator support oracle.ideimpl.indexing-migrator 11.1.1.4.37.59.36 Loaded
JDeveloper Runner oracle.jdeveloper.runner 11.1.1.4.37.59.36 Loaded
JViews Registration Addin oracle.diagram.registration 11.1.1.4.37.59.36 Loaded
Log Window oracle.ide.log 11.1.1.4.37.59.36 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.4.37.59.36 Loaded
Navigator oracle.ide.navigator 11.1.1.4.37.59.36 Loaded
Object Gallery oracle.ide.gallery 11.1.1.4.37.59.36 Loaded
Oracle IDE oracle.ide 11.1.1.4.37.59.36 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.1.2.03.97 Loaded
Oracle SQL Developer - 3rd Party Database Browsers oracle.sqldeveloper.thirdparty.browsers 11.1.1.03.97 Loaded
Oracle SQL Developer - DBA Navigator oracle.sqldeveloper.dbanavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Extras oracle.sqldeveloper.extras 1.1.1.03.97 Loaded
Oracle SQL Developer - File Navigator oracle.sqldeveloper.filenavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Antlr3 Translator oracle.sqldeveloper.migration.translation.core_antlr3 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Application Migration oracle.sqldeveloper.migration.application 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Core oracle.sqldeveloper.migration 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 oracle.sqldeveloper.migration.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 Translator oracle.sqldeveloper.migration.translation.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft Access oracle.sqldeveloper.migration.msaccess 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft SQL Server oracle.sqldeveloper.migration.sqlserver 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations MySQL oracle.sqldeveloper.migration.mysql 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Sybase Adaptive Server oracle.sqldeveloper.migration.sybase 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations T-SQL Translator oracle.sqldeveloper.migration.translation.core 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Teradata oracle.sqldeveloper.migration.teradata 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Translation UI oracle.sqldeveloper.migration.translation.gui 11.1.1.03.97 Loaded
Oracle SQL Developer - Object Viewer oracle.sqldeveloper.oviewer 11.1.1.03.97 Loaded
Oracle SQL Developer - Real Time SQL Monitoring oracle.sqldeveloper.sqlmonitor 11.1.1.03.97 Loaded
Oracle SQL Developer - Reports oracle.sqldeveloper.report 11.1.1.03.97 Loaded
Oracle SQL Developer - Scheduler oracle.sqldeveloper.scheduler 11.1.1.03.97 Loaded
Oracle SQL Developer - Schema Browser oracle.sqldeveloper.schemabrowser 11.1.1.03.97 Loaded
Oracle SQL Developer - SearchBar oracle.sqldeveloper.searchbar 11.1.1.03.97 Loaded
Oracle SQL Developer - Snippet oracle.sqldeveloper.snippet 11.1.1.03.97 Loaded
Oracle SQL Developer - Spatial oracle.sqldeveloper.spatial 11.1.1.03.97 Loaded
Oracle SQL Developer - TimesTen oracle.sqldeveloper.timesten 2.0.0.03.97 Loaded
Oracle SQL Developer - Tuning oracle.sqldeveloper.tuning 11.1.1.03.97 Loaded
Oracle SQL Developer - Unit Test oracle.sqldeveloper.unit_test 11.1.1.03.97 Loaded
Oracle SQL Developer - User Extensions Support oracle.sqldeveloper.userextensions 11.1.1.03.97 Loaded
Oracle SQL Developer - Worksheet v2 oracle.sqldeveloper.worksheet 11.1.1.03.97 Loaded
Oracle SQL Developer - XML Schema oracle.sqldeveloper.xmlschema 11.1.1.03.97 Loaded
Oracle SQL Developer Data Modeler oracle.datamodeler 3.0.0.665 Loaded
Oracle SQL Developer Data Modeler - Reports oracle.sqldeveloper.datamodeler_reports 11.1.1.03.97 Loaded
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.4.37.59.36 Loaded
Peek oracle.ide.peek 11.1.1.4.37.59.36 Loaded
Persistent Storage oracle.ide.persistence 11.1.1.4.37.59.36 Loaded
Property Inspector oracle.ide.inspector 11.1.1.4.37.59.36 Loaded
QuickDiff oracle.ide.quickdiff 11.1.1.4.37.59.36 Loaded
Replace With oracle.ide.replace 11.1.1.4.37.59.36 Loaded
Runner oracle.ide.runner 11.1.1.4.37.59.36 Loaded
VHV oracle.ide.vhv 11.1.1.4.37.59.36 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.4.37.59.36 Loaded
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.4.37.59.36 Loaded
Virtual File System oracle.ide.vfs 11.1.1.4.37.59.36 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.4.37.59.36 Loaded
XML Editing Framework IDE Extension oracle.ide.xmlef 11.1.1.4.37.59.36 Loaded
audit oracle.ide.audit 11.1.1.4.37.59.36 Loaded
classpath: protocol handler extension oracle.jdeveloper.classpath 11.1.1.0.0 Loaded
jdukshare oracle.bm.jdukshare 11.1.1.4.37.59.36 Loaded
mof-xmi oracle.mof.xmi 11.1.1.4.37.59.36 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.4.37.59.36 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.4.37.59.36 Loaded
palette2 oracle.ide.palette2 11.1.1.4.37.59.36 Loaded
status oracle.ide.status 11.1.1.4.37.59.36 Loaded
Edited by: user501466 on 19-Mar-2011 03:21Hi Dermot,
Some clarification.
I have tried these 3 drivers below with the following results:
5.0.4 First Query succeeds, Second gives error "Unknown prepared statement handler (131072) given to mysqld_stmt_execute". At this point I can exit SQL Developer. If I run it a third time then the query does not complete and any attempt to exit SQL Developer results in "Connection is currently busy, try again?" and ultimately I have to kill it.
5.0.8 First Query succeeds, Second Query fails with Query execution was interrupted. Subsequent queries give the same result.
5.1.15 Same as 5.0.8
I tried your suggestion, removed the driver, restarted, installed the 5.0.4 driver and restated and ran the test,
(I added a drop table so I could run it repeatedly) and it works repeatedly if I choose "Run as script F5".
DROP TABLE table1;
CREATE TABLE table1(col1 int);
INSERT INTO Table1 values(1);
SELECT * FROM table1;
SELECT * FROM table1;
But If I execute the query "select * from table1" using "Run Statement Ctrl-Enter" twice then I get problem behaviour as described above.
I looked in the logfile for SQLDeveloper but it was empty.
I also tried creating a new database as root and connecting as root (same result)
I also tried the NightlyBuild of 5.1 and 6.0 but gave the same result as 5.1.5.
I have two other tools for accessing MySql: Toad and MySql workbench, both of which work but I've used SQL Developer with Oracle for some years and would like to keep using it.
I just tried connecting to a remote MySQL database and that seems to work without problems.
I'm thinking it may be related to some incompatibility between SQLDeveloper and the MySQL installed locally.
I'll try another version....
Ok I installed a 32 bit version of MySql 5.5.10. I thought things were working but now I still get the problem but it is much more intermittent.
Now I can get it by modifying the query ie.
select * from table1; (works repeatedly untill followed by a change to the query)
select * from table1 order by col1; (fails)
Another case
select * from table1 order by col1; (works repeatedly)
select * from table1 order by col1 asc; (fails first time)
very weird...
Edited by: user501466 on 26-Mar-2011 06:19 -
AMFPHP and AS3FLEXDB - how to disable 'busy indicator' during query execution ?
I'm doing some experiments with Flex and SQL with use of as3flexdb and AMFPHP.
I've written some application which is pushing some data to SQL base...
problem is, that durring query execution, there is some 'busy indicator' on the screen
- some circle, and word 'loading'.
Have you any idea how to disable this ?
Everything what I'm doing is based on this tutorial below, but there is no idea in it how to
disable the indicator.
http://ghalex.com/blog/tag/as3flexdb
I'm not sure if this indicator comes from as3flexdb libraries or AMFPHP itself ?
Has anyone of you had such problem before ??
Thanks for all ideas
Rymas,Unfortunatelly my cheers was to early
I've successfully decompiled the library swc file, found Query.as class and corrected things mentioned in this
post : http://itutorials.ro/viewtopic.php?f=9&t=22&p=59&hilit=loading#p59
... but I cannot compile the library.fla back to swf ... it's generating some errors
Could anyone help me with that, maybe you've got more expirience with decompiling and compiling.
Orginal .swc file is here : http://www.rymasek.iq.pl/swc/as3flexdb_1.3.0.swc
Thanks for help !! -
VC 7.0 - Performance during query execution
Hi Experts,
we have built an VC cockpit wich includes ~35 Querys.
When the user opens the cockpit the VC modell starts all 35 querys.
When we start the querys in the SAP BI System (RSRT) they all need less than 1 sek each.
Our BI system is able to handel 40 querys simultaneous.
Our problem is that the cockpit need ~40 sec. until all querys have been finished.
We suppose, that the VC starts all querys seriell instead of parallel.
Is there any configuration where i can switch between parallel and serial mode?
Thanks for your help
Regards
FlorianHello,
Using the dedicated connection for nested iViews feature, was good thinking.
But - since the execution time of your queries is relatively short compared to the overall time for the "running a query" process, i.e. the HTTP request for execution, creating the connection on portal side, executing the query, returning the result and displaying it on the Flex runtime. --
all the other factors in this equations takes more time (relatively) than the query execution itself. (~1 seconds).
That is the reason why you don't observe major changes between running your 40 queries on a single connection or on multiple connections.
This feature was intended for queries that run for a long period of time. (tens of seconds or minutes)
in such queries, you will see the difference.
Mark,
Visual Composer 7.0 development and maintenance team. -
ORA-03113: end-of-file on communication channel during query execution
Hi All,
My production database is running on 9.2.0.1 on windows 2003 adv srv.
I have some web-based application (ASP.NET) which is using this database.
From yesterdasy onwards, i started receieving ORA-03113 error while running a perticular query.(Query given below)
I did following yesterday during my maintanance window.
1)Perform object re-org by exp/imp for a business schema
2)modify some sizing parameters
3)introduced parallelism
4)change ini_trans for some hot tables from 1 to 10
5)Change my optimizer mode to ALL_ROWS from CHOOSE
6)collected object statistics for that particular business schema
Below are my changed value of init.ora parameters
java_pool_size big integer 25165824
parallel_max_servers integer 4 (I have dual CPU)
large_pool_size big integer 0 (from 8 MB)
shared_pool_size big integer 754974720 (Decreased from 808 MB)
db_cache_size big integer 805306368 (Increased from 416 MB)
sga_max_size big integer 2149133572
pga_aggregate_target big integer 429916160 (Increased from 216 MB)
SELECT A.Itemcode,
(SELECT Sum(Nvl(PS.PPR_SCHD_QTY,0)) FROM TXN_PR_HDR PH
LEFT OUTER JOIN TXN_PR_ITEM_DTL PI ON PH.PR_NO = PI.PR_NO
LEFT OUTER JOIN TXN_PR_ITEM_SCHD_DTL PS ON PI.PR_NO = PS.PR_NO AND PI.SRNO = PS.PR_SRNO
WHERE ITEMCODE LIKE '870927400' and PH.FLAG IN ('2','3') AND PH.PR_TYPE <> 'A' ) AS PPR_QTY,
(SELECT Sum((Nvl(A.SCHD_QTY ,0) - (Nvl(A.CANC_QTY,0) + Nvl(A.RCVDQTY,0))))
FROM TXN_PO_ITEM_DTL e inner join TXN_PO_ITEM_SCH_DTL A
ON (e.PO_NO = a.PO_NO AND e.SRNO = a.po_SRNO)
WHERE (CASE WHEN E.toiTEMCODE IS NOT null THEN E.toiTEMCODE ELSE e.itemcode END) LIKE '870927400' AND (Nvl(A.SCHD_QTY ,0) - (Nvl(A.CANC_QTY,0) + Nvl(A.RCVDQTY,0)))>0 ) AS PPO_QTY
(SELECT SUM(NVL(CHALLAN_QTY,0) - NVL(GRN_QTY,0)) AS CHALQTY FROM TXN_IGP_DTL DTL INNER JOIN TXN_IGP_HDR HDR
ON DTL.IGP_NO=HDR.IGP_NO WHERE ITEMCODE LIKE '870927400' AND FLAG='2') AS CHAL_QTY,
(SELECT SUM( CASE WHEN SO.STATUS NOT IN ('C','K') AND SONO IS NOT NULL
THEN (D.REQQTY-NVL(D.ALLOCQTY, 0) - NVL(D.ISUQTY, 0))
ELSE 0 END) || '#' ||
Sum(CASE WHEN ((NVL(ALLOCQTY,0) - NVL(UN_APR_QTY,0))> 0) AND IS_UNIT='I' AND SONO IS NOT NULL
THEN (NVL(ALLOCQTY,0) - NVL(UN_APR_QTY,0))
ELSE 0 END) || '#' ||
Sum(CASE WHEN cat=3 AND D.SHTQTY >0 THEN Nvl(D.SHTQTY,0) ELSE 0 END) || '#' ||
Sum(CASE WHEN cat=5 AND D.ALLOCQTY >0 THEN Nvl(D.ALLOCQTY,0) ELSE 0 END)
FROM TXN_MRP_P_ITEM_DTL D
INNER JOIN TXN_MRP_P_HDR H ON D.MRP_P_NO=H.MRP_P_NO
LEFT OUTER JOIN SPA_TXN_SO_HDR SO ON H.SONO=SO.SONO
WHERE
D.ITEMCODE LIKE '870927400') PQTY,
(SELECT SUM(NVL(EXPT_QTY,0)) AS SUB_CONT FROM VW_SENT_EXP_ITEM WHERE EXP_ITEM LIKE '870927400') AS SUB_CONT_BAL,
(SELECT SUM(NVL(SENT_QTY,0)) FROM VW_SENT_EXP_ITEM WHERE SENT_ITEM LIKE '870927400') AS OUTSUBCONT
, Nvl((SELECT SUM(NVL(RECEIVED_QTY,0)) FROM TXN_GRN_ITEM_DTL WHERE ITEM_STATUS<>'Clear' AND ITEMCODE LIKE '870927400'),0) AS HOLD
,(SELECT SUM(NVL(UND_INSP,0)) FROM VW_STO_CURR_BAL v WHERE v.ITEMCODE='870927400') AS UND_INSP
FROM MST_ITEM A
LEFT OUTER JOIN MST_ITEM_PUR B ON A.ITEMCODE=B.ITEMCODE
WHERE A.ITEMCODE='870927400'I captured 10046 trace and it contains below lines at bottom:
WAIT #1: nam='db file sequential read' ela= 279 p1=12 p2=883216 p3=1
WAIT #1: nam='db file sequential read' ela= 196 p1=12 p2=883220 p3=1
WAIT #1: nam='db file sequential read' ela= 253 p1=12 p2=883225 p3=1
WAIT #1: nam='db file sequential read' ela= 185 p1=12 p2=883232 p3=1
WAIT #1: nam='db file sequential read' ela= 52614 p1=12 p2=883239 p3=1
WAIT #1: nam='db file sequential read' ela= 198 p1=12 p2=883243 p3=1
WAIT #1: nam='db file sequential read' ela= 213 p1=12 p2=883248 p3=1
WAIT #1: nam='db file scattered read' ela= 304 p1=12 p2=883251 p3=2
WAIT #1: nam='db file sequential read' ela= 201 p1=12 p2=883255 p3=1
WAIT #1: nam='db file sequential read' ela= 191 p1=12 p2=883260 p3=1
WAIT #1: nam='db file sequential read' ela= 10939 p1=12 p2=883263 p3=1
WAIT #1: nam='db file sequential read' ela= 148 p1=12 p2=883271 p3=1Below is TKPROF output of above trace
call count cpu elapsed disk query current rows
Parse 1 0.21 0.21 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.21 0.21 0 0 0 0
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user id: 133
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
db file sequential read 227 0.05 0.34
db file scattered read 424 0.01 0.51When parallel degree =4, i got below msg in tkprof
call count cpu elapsed disk query current rows
Parse 1 0.21 0.22 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.02 0 381 0 0
total 3 0.21 0.25 0 381 0 0
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user id: 133
Rows Row Source Operation
1 NESTED LOOPS OUTER (cr=4 r=0 w=0 time=26 us)
1 INDEX UNIQUE SCAN OBJ#(564427) (cr=2 r=0 w=0 time=16 us)(object id 564427)
1 INDEX UNIQUE SCAN OBJ#(564464) (cr=2 r=0 w=0 time=8 us)(object id 564464)
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
PX Deq: Join ACK 3 0.00 0.00
PX Deq: Parse Reply 2 0.01 0.01
enqueue 4 0.01 0.02
SQL*Net break/reset to client 2 0.00 0.00
SQL*Net message from client 1 24.72 24.72I then, changed DOP to 1 for all tables invloved in query.But still i am getting end of comm err.
Looking fw to have solution.
Regards,
Bhavik DesaiJust to update:
I got below in core dump
------------------- Raw Stack Dump -----------------------
Address Dump of bytes
0x0dc2d4d0 50 d8 a3 06 b4 79 a9 06 - 08 00 03 00 e8 1f 00 00 P....y..........
0x0dc2d4e0 01 00 00 00 00 00 00 00 - 40 4f a9 06 00 00 00 00 ........@O......
0x0dc2d4f0 00 00 00 00 00 04 10 00 - 8c 8b 4c 00 38 d4 c2 0d ..........L.8...
0x0dc2d500 ec 84 71 00 00 00 00 00 - 00 00 00 00 8c 83 7b 00 ..q...........{.
0x0dc2d510 34 52 a3 06 00 00 00 00 - 00 00 00 00 00 00 00 00 4R..............
0x0dc2d520 00 00 00 00 ff ff ff ff - ff ff 00 00 00 00 00 00 ................
0x0dc2d530 00 00 00 00 00 00 00 00 - 0e 00 00 00 00 00 00 00 ................
0x0dc2d540 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
0x0dc2d550 00 00 00 00 26 ea a9 06 - 00 00 00 00 b0 22 41 01 ....&........"A.
0x0dc2d560 0c d6 c2 0d b0 00 00 00 - 00 00 00 00 05 00 00 00 ................
0x0dc2d570 10 d6 c2 0d 1d 0d 53 00 - b4 79 a9 06 cc 9d a9 06 ......S..y......
0x0dc2d580 c0 52 67 19 c8 77 00 53 - c8 77 00 53 6c 76 a9 06 .Rg..w.S.w.Slv..
0x0dc2d590 d0 d4 c2 0d fc d0 c2 0d - 98 d8 c2 0d b0 22 41 01 ............."A.
0x0dc2d5a0 ec 30 5b 02 ff ff ff ff - d0 d5 c2 0d a9 94 06 01 .0[.............
0x0dc2d5b0 d8 26 da 17 06 00 00 00 - 40 63 b5 1d 18 04 00 00 .&......@c......
0x0dc2d5c0 48 03 00 00 c8 77 00 53 - 0b 00 00 00 f0 52 67 19 H....w.S.....Rg.
0x0dc2d5d0 60 d6 c2 0d 3e cb 52 00 - f8 d6 c2 0d ff 7f 00 00 `...>.R.........
0x0dc2d5e0 02 50 1e 2c 00 32 00 00 - 01 00 00 00 28 59 79 3c .P.,.2......(Yy<
0x0dc2d5f0 00 00 00 00 0f 00 00 00 - 01 00 00 00 26 ea a9 06 ............&...
0x0dc2d600 01 00 00 00 40 63 b5 1d - 01 00 00 00 01 00 00 00 ....@c..........
0x0dc2d610 40 63 b5 1d c8 77 00 53 - 00 00 00 00 00 d6 c2 0d @c...w.S........
0x0dc2d620 01 00 00 00 00 00 00 00 - 30 52 a3 06 68 63 b5 1d ........0R..hc..
0x0dc2d630 10 00 00 00 01 00 00 00 - 14 63 b5 1d 00 00 00 00 .........c......
0x0dc2d640 00 00 00 00 01 00 00 00 - 44 ea a9 06 06 00 00 00 ........D.......
0x0dc2d650 18 4e a3 06 18 00 00 00 - e8 62 b5 1d 00 94 06 01 .N.......b......
0x0dc2d660 b4 d6 c2 0d ed 8e 51 00 - 40 63 b5 1d 00 94 06 01 ......Q.@c......
0x0dc2d670 f8 d6 c2 0d ff 7f 00 00 - 6c 92 51 00 b0 67 b5 1d ........l.Q..g..
0x0dc2d680 01 00 00 00 18 4e a3 06 - f4 05 00 00 28 38 a3 06 .....N......(8..
0x0dc2d690 ff 7f 00 00 ff 7f 00 00 - 00 50 b0 00 c8 77 00 53 .........P...w.S
0x0dc2d6a0 18 04 00 00 18 4e a3 06 - f8 d6 c2 0d 00 94 06 01 .....N..........
0x0dc2d6b0 e8 03 00 00 d4 d6 c2 0d - 55 51 b0 00 e8 62 b5 1d ........UQ...b..
0x0dc2d6c0 00 94 06 01 f8 d6 c2 0d - ff 7f 00 00 ec 37 a3 06 .............7..
0x0dc2d6d0 40 91 bf 39 08 d7 c2 0d - 3f 92 06 01 40 91 bf 39 @[email protected]
0x0dc2d6e0 00 94 06 01 f8 d6 c2 0d - ff 7f 00 00 e8 37 a3 06 .............7..
0x0dc2d6f0 e4 90 bf 39 2c d7 c2 0d - 10 ae 07 01 2c d7 c2 0d ...9,.......,...
0x0dc2d700 14 91 bf 39 c8 77 00 53 - 38 d7 c2 0d 9d ac 07 01 ...9.w.S8.......
0x0dc2d710 14 91 bf 39 00 94 06 01 - f8 d6 c2 0d ff 7f 00 00 ...9............
0x0dc2d720 a0 36 a3 06 d0 37 a3 06 - 70 37 a3 06 d0 fb 02 01 .6...7..p7......
0x0dc2d730 94 90 bf 39 e4 90 bf 39 - 88 d7 c2 0d 5a e4 02 01 ...9...9....Z...
0x0dc2d740 4c 54 67 19 d0 fb 02 01 - 2c d7 c2 0d ff 7f 00 00 LTg.....,.......
0x0dc2d750 c8 77 00 53 6c 7f e0 16 - 44 c9 a3 06 01 00 00 00 .w.Sl...D.......
0x0dc2d760 00 00 00 00 00 00 00 00 - 00 00 00 00 44 c9 a3 06 ............D...
0x0dc2d770 00 00 00 00 58 54 67 19 - c8 77 00 53 94 0b 1a 18 ....XTg..w.S....
0x0dc2d780 a0 36 a3 06 c4 d6 c2 0d - c4 d7 c2 0d 0e 74 f2 00 .6...........t..
0x0dc2d790 94 90 bf 39 00 00 00 00 - 00 00 00 00 01 00 00 00 ...9............
0x0dc2d7a0 94 90 bf 39 01 00 00 00 - dc 00 00 00 6c 7f e0 16 ...9........l...
0x0dc2d7b0 dc 55 a9 06 44 c9 a3 06 - c8 77 00 53 34 37 76 24 .U..D....w.S47v$
0x0dc2d7c0 00 00 00 00 a8 d8 c2 0d - 29 39 4e 00 6c 7f e0 16 ........)9N.l...
0x0dc2d7d0 50 d8 a3 06 dc 55 a9 06 - 2c d8 c2 0d ec c1 a3 06 P....U..,.......
0x0dc2d7e0 6c 2d 7b 00 f8 d7 c2 0d - 13 02 00 00 c0 21 79 00 l-{..........!y.
0x0dc2d7f0 08 bc 79 00 00 00 00 00 - ec c1 a3 06 c4 6f a3 06 ..y..........o..
0x0dc2d800 4c d9 c2 0d 06 00 00 00 - 26 b4 40 04 03 00 00 00 L.......&.@.....
0x0dc2d810 70 cf 00 53 00 00 20 01 - ff ff 00 00 bc 1f 5a 00 p..S.. .......Z.
0x0dc2d820 00 00 00 00 00 00 00 00 - 2c d8 c2 0d 00 00 00 00 ........,.......
0x0dc2d830 00 00 00 00 11 00 00 00 - 26 b4 40 04 f0 9c 08 00 ........&.@.....
0x0dc2d840 f0 9c 08 00 08 00 03 00 - e8 1f 00 00 01 00 00 00 ................
0x0dc2d850 00 00 00 00 40 4f a9 06 - 00 00 00 00 00 00 00 00 ....@O..........
0x0dc2d860 00 04 10 00 8c 8b 4c 00 - a4 d7 c2 0d ec 84 71 00 ......L.......q.
0x0dc2d870 00 00 00 00 00 00 00 00 - c8 77 00 53 00 db c2 0d .........w.S....
0x0dc2d880 a0 da 00 53 00 00 00 00 - c8 77 00 53 38 4f a9 06 ...S.....w.S8O..
0x0dc2d890 d0 d7 c2 0d fc d0 c2 0d - 14 dc c2 0d b0 22 41 01 ............."A.
0x0dc2d8a0 ec 30 5b 02 ff ff ff ff - 1c d9 c2 0d f2 b2 9d 00 .0[.............
0x0dc2d8b0 b4 3a 76 24 76 00 00 00 - 38 bb a3 06 64 04 00 00 .:v$v...8...d...
0x0dc2d8c0 ce 6f a3 06 a4 da 00 53 - 50 d8 a3 06 5b 60 5f 00 .o.....SP...[`_.
0x0dc2d8d0 50 79 00 53 08 00 00 00 - 8c db a3 06 b8 f4 c6 31 Py.S...........1
0x0dc2d8e0 00 00 00 00 f5 6f a3 06 - 04 00 00 00 00 00 00 00 .....o..........
0x0dc2d8f0 c8 77 00 53 bc 0e 17 09 - 00 4b a9 06 09 00 00 00 .w.S.....K......
0x0dc2d900 00 00 00 00 2c 78 e0 16 - 58 dc a9 06 00 00 00 00 ....,x..X.......
0x0dc2d910 06 00 00 00 0c 0f 17 09 - 2c 4c a9 06 3c d9 c2 0d ........,L..<...
0x0dc2d920 92 36 7b 00 00 db c2 0d - 76 00 00 00 ec 6f a3 06 .6{.....v....o..
0x0dc2d930 b0 06 00 00 06 00 00 00 - dc e9 c6 31 cc d9 c2 0d ...........1....
0x0dc2d940 3e cb 52 00 e4 d9 c2 0d - 76 00 00 00 04 00 12 18 >.R.....v.......
0x0dc2d950 00 2d 00 00 01 00 00 00 - b4 73 2a 17 00 00 00 00 .-.......s*.....
0x0dc2d960 09 00 00 00 01 00 00 00 - ce 6f a3 06 01 00 00 00 .........o......
0x0dc2d970 dc e9 c6 31 01 00 00 00 - 01 00 00 00 dc e9 c6 31 ...1...........1
0x0dc2d980 c8 77 00 53 00 00 00 00 - 00 d9 c2 0d 01 00 00 00 .w.S............
0x0dc2d990 00 00 00 00 e8 c1 a3 06 - 04 ea c6 31 0a 00 00 00 ...........1....
0x0dc2d9a0 01 00 00 00 50 d8 a3 06 - 00 00 00 00 00 00 00 00 ....P...........
0x0dc2d9b0 01 00 00 00 ec 6f a3 06 - 06 00 00 00 38 bb a3 06 .....o......8...
0x0dc2d9c0 18 00 00 00 9c e8 c6 31 - 28 36 7b 00 20 da c2 0d .......1(6{. ...
------------------- End of Raw Stack Dump ----------------
{code}
-Bhavik -
Index slows down query execution
Hello everybody,
I have reordered the join conditions for the query...
select (first_name||' '||middle_name||' '||last_name) name,regn_no,age,gender,
(select loc_name from locations where loc_id=location_code and loc_h_id='L6') district,
person_id from persons p,musers u where reg_center_id=u.center_id and
p.ipop='RG' and u.user_id = '8832' and u.eff_end_dt is null and p.CID = '1' order by p.crt_dt desc
like this...
select (first_name||' '||middle_name||' '||last_name) name,regn_no,age,gender,
(select loc_name from locations where loc_id=location_code and loc_h_id='L6') district,
person_id from musers u, persons p where reg_center_id=u.center_id and u.user_id = '8832'
and p.ipop='RG' and u.eff_end_dt is null and p.CID = '1'
because
select count(*) from persons p, musers u where reg_center_id=u.center_id and
p.ipop='RG' is 13002
and
select count(*) from persons p, musers u where reg_center_id=u.center_id and u.user_id = '8832' is 1007.
In this excercise I have a couple of questions..
1. This did not show any difference in the CPU time.
and,
I have created an index 'idx_ipop_persons' on persons(ipop) "create index idx_ipop_persons on persons(ipop)".
2. The query is taking more time to execute than it was before creating the index.
Please help me...
Thanks,
Aswin.Please post the execution plan for your query.
And also i need some details:
select count(*) from person where ipop='RG';
How many records fetch?
select distinct ipop from persons; --How many
records fetch?
Regards
RajaBaskar
Execution plan:
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=921 Card=176 Bytes
=11088)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'LOCATIONS' (TABLE)
(Cost=2 Card=1 Bytes=38)
2 1 INDEX (RANGE SCAN) OF 'IDX_LOCID_LOCHDR_LOCATIONS' (INDE
X) (Cost=1 Card=1)
3 0 TABLE ACCESS (BY INDEX ROWID) OF 'PERSONS' (TABLE) (
Cost=918 Card=176 Bytes=9152)
4 3 NESTED LOOPS (Cost=921 Card=176 Bytes=11088)
5 4 TABLE ACCESS (BY INDEX ROWID) OF 'MUSERS' (TA
BLE) (Cost=3 Card=1 Bytes=11)
6 5 INDEX (RANGE SCAN) OF 'PK_MUSERS' (INDEX (UNIQUE)
) (Cost=2 Card=1)
7 4 INDEX (RANGE SCAN) OF 'IDX2_PERSONS' (INDEX) (Co
st=1 Card=1464)
select count(*) from person where ipop='RG';
count(*)
12135
select distinct ipop from persons;
distinct ipop
RG
OP
IP
RF
CR -
Getting wait event "direct path write temp" during query execution
Hi All,
While executing one query in database, it is taking longer time and failing with error "ORA-01652: unable to extend temp segment by 1280 in tablespace PSTEMP".
I have increaesd the Temp tablespace size also till 96GB, Database size is 120GB.
I have upgraded the database from 10.2.0.3 to 11.2.0.3 version last month.
same query is running fine in other databases on same version.
It is giving me "Direct write temp path" wait event.
server load is also normal.
I have increased pga_aggregate_target upto 512MB but it has not solved my problem
Can you please help me out to solve this issue.Hi Nicolay,
Please find below output from that query :
SQL>
SELECT DBMS_SQLTUNE.report_sql_monitor(
sql_id => '(*******',
type => 'TEXT',
report_level => 'ALL') AS report
FROM dual;SQL> 2 3 4 5
SQL Monitoring Report
SQL Text
SELECT ASGN.TRANSACTIONID ,ASGN.UPA_CLIENT_ID FROM PS_UPA_CM_PRE_ASGN ASGN ,PS_UPA_CLIENT_TBL CL ,PS_UPA_CM_ADMIN_WL WL ,PSXLATITEM XCT ,PSXLATITEM XCS ,PS_PWC_INDUSTR_TBL IND ,PS_PWC_SUBIND_TBL SCT ,PS_UPA_FIN_REG_TBL REG ,PS_UPA_CM_MKT_VW1 MKT WHERE ASGN.UPA_CLIENT_ID = CL.UPA_CLIENT_ID AND CL.UPA_CM_GRP_ID = ' ' AND ASGN.UPA_CM_ADMIN_ACT = 'RCD' AND ASGN.UPA_CM_CLT_ROLENBR = WL.UPA_CM_CLT_ROLENBR AND ASGN.UPA_CM_ROLENBR_SEQ = WL.UPA_CM_ROLENBR_SEQ AND WL.UPA_CM_WL_STATUS = 'A' AND
WL.UPA_CM_ADMIN_ACT = 'RCD' AND CL.EFFDT = ( SELECT MAX(CL1.EFFDT) FROM PS_UPA_CLIENT_TBL CL1 WHERE CL1.UPA_CLIENT_ID = CL.UPA_CLIENT_ID AND CL1.EFFDT <= SYSDATE) AND CL.EFF_STATUS = 'A' AND CL.UPA_MONTH_DAY <> ' ' AND CL.UPA_CLIENT_TYPE <> ' ' AND CL.UPA_CLIENT_SEGMENT <> ' ' AND CL.PWC_INDUSTRY <> ' ' AND CL.PWC_SUB_INDUSTRY <> ' ' AND CL.UPA_FIN_REGION <> ' ' AND CL.UPA_STRAT_MKT <> ' ' AND CL.UPA_CLT_PRIORITIZ <> ' ' /*Harieash - Aadded as part of PR support IR 43024 */ AND XCT.FIELDNAME =
'UPA_CLIENT_TYPE' AND XCT.FIELDVALUE = CL.UPA_CLIENT_TYPE AND XCT.EFFDT = ( SELECT MAX(XCT1.EFFDT) FROM PSXLATITEM XCT1 WHERE XCT1.FIELDNAME = XCT.FIELDNAME AND XCT1.FIELDVALUE = XCT.FIELDVALUE AND XCT1.EFFDT <= SYSDATE) AND XCT.EFF_STATUS = 'A' AND XCS.FIELDNAME = 'UPA_CLIENT_SEGMENT' AND XCS.FIELDVALUE = CL.UPA_CLIENT_SEGMENT AND XCS.EFFDT = ( SELECT MAX(XCS1.EFFDT) FROM PSXLATITEM XCS1 WHERE XCS1.FIELDNAME = XCS.FIELDNAME AND XCS1.FIELDVALUE = XCS.FIELDVALUE AND XCS1.EFFDT <= SYSDATE) AND
XCS.EFF_STATUS = 'A' AND IND.SETID = 'USA00' AND CL.PWC_INDUSTRY = IND.PWC_INDUSTRY AND IND.EFFDT = ( SELECT MAX(IND1.EFFDT) FROM PS_PWC_INDUSTR_TBL IND1 WHERE IND1.SETID = IND.SETID AND IND1.PWC_INDUSTRY = IND.PWC_INDUSTRY AND IND1.EFFDT <= SYSDATE) AND IND.EFF_STATUS = 'A' AND SCT.SETID = 'USA00' AND CL.PWC_SUB_INDUSTRY = SCT.PWC_SUB_INDUSTRY AND SCT.EFFDT = ( SELECT MAX(SCT1.EFFDT) FROM PS_PWC_SUBIND_TBL SCT1 WHERE SCT1.SETID = SCT.SETID AND SCT1.PWC_SUB_INDUSTRY = SCT.PWC_SUB_INDUSTRY AND
SCT1.EFFDT <= SYSDATE) AND SCT.EFF_STATUS = 'A' AND REG.SETID = 'USA00' AND CL.UPA_FIN_REGION = REG.UPA_FIN_REGION AND REG.EFFDT = ( SELECT MAX(REG1.EFFDT) FROM PS_UPA_FIN_REG_TBL REG1 WHERE REG1.SETID = 'USA00' AND REG1.UPA_FIN_REGION = REG.UPA_FIN_REGION AND REG1.EFFDT <= SYSDATE) AND REG.EFF_STATUS = 'A' AND CL.UPA_STRAT_MKT = MKT.UPA_STRAT_MKT
Global Information
Status : EXECUTING
Instance ID : 1
Session : *******
SQL ID : *******
SQL Execution ID : *********
Execution Started : 11/12/2012 04:31:25
First Refresh Time : 11/12/2012 04:31:33
Last Refresh Time : 11/12/2012 04:31:55
Duration : 31s
Module/Action : ***** (TNS V1-V3)/-
Service : SYS$USERS
Program : ******* (TNS V1-V3)
Global Stats
=========================================================
| Elapsed | Cpu | IO | Buffer | Write | Write |
| Time(s) | Time(s) | Waits(s) | Gets | Reqs | Bytes |
=========================================================
| 33 | 25 | 7.30 | 162 | 4755 | 557MB |
=========================================================
SQL Plan Monitoring Details (Plan Hash Value=2177602723)
========================================================================================================================================================================================================
| Id | Operation | Name | Rows | Cost | Time | Start | Execs | Rows | Write | Write | Mem | Temp | Activity | Activity Detail |
| | | | (Estim) | | Active(s) | Active | | (Actual) | Reqs | Bytes | | | (%) | (# samples) |
========================================================================================================================================================================================================
| 0 | SELECT STATEMENT | | | | | | 1 | | | | | | | |
| 1 | NESTED LOOPS | | | | | | 1 | | | | | | | |
| 2 | NESTED LOOPS | | 1 | 491 | | | 1 | | | | | | | |
| -> 3 | HASH JOIN | | 120 | 130 | 31 | +1 | 1 | 0 | 4011 | 470MB | 95M | 598M | 80.65 | Cpu (19) |
| | | | | | | | | | | | | | | direct path write temp (6) |
| -> 4 | MERGE JOIN CARTESIAN | | 120 | 61 | 23 | +8 | 1 | 13M | | | | | | |
| -> 5 | MERGE JOIN CARTESIAN | | 1 | 38 | 23 | +8 | 1 | 1870 | | | | | | |
| -> 6 | MERGE JOIN CARTESIAN | | 1 | 37 | 23 | +8 | 1 | 70 | | | | | | |
| -> 7 | MERGE JOIN CARTESIAN | | 1 | 35 | 23 | +8 | 1 | 12 | | | | | | |
| 8 | MERGE JOIN CARTESIAN | | 1 | 33 | 21 | +8 | 1 | 2 | | | | | | |
| 9 | MERGE JOIN CARTESIAN | | 1 | 31 | 1 | +8 | 1 | 1 | | | | | | |
| 10 | VIEW | PS_UPA_CM_MKT_VW1 | 1 | 29 | 1 | +8 | 1 | 1 | | | | | | |
| 11 | SORT UNIQUE | | 1 | 28 | 1 | +8 | 1 | 1 | | | | | | |
| 12 | TABLE ACCESS BY INDEX ROWID | PS_UPA_ST_MKT_TBL | 10 | 2 | 1 | +8 | 1 | 43 | | | | | | |
| 13 | INDEX SKIP SCAN | PS0UPA_ST_MKT_TBL | 10 | 1 | 1 | +8 | 1 | 43 | | | | | | |
| 14 | SORT AGGREGATE | | 1 | | 1 | +8 | 33 | 33 | | | | | | |
| 15 | INDEX SKIP SCAN | PS0UPA_ST_MKT_TBL | 2 | 1 | 1 | +8 | 33 | 50 | | | | | | |
| 16 | BUFFER SORT | | 1 | 31 | 1 | +8 | 1 | 1 | | | | | | |
| 17 | TABLE ACCESS BY INDEX ROWID | PSXLATITEM | 1 | 2 | 1 | +8 | 1 | 14 | | | | | | |
| 18 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 1 | 14 | | | | | | |
| 19 | SORT AGGREGATE | | 1 | | 1 | +8 | 14 | 14 | | | | | | |
| 20 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 14 | 14 | | | | | | |
| 21 | BUFFER SORT | | 1 | 31 | 21 | +8 | 1 | 2 | | | | | | |
| 22 | TABLE ACCESS BY INDEX ROWID | PSXLATITEM | 1 | 2 | 1 | +8 | 1 | 2 | | | | | | |
| 23 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 1 | 2 | | | | | | |
| 24 | SORT AGGREGATE | | 1 | | 1 | +8 | 2 | 2 | | | | | | |
| 25 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 2 | 2 | | | | | | |
| -> 26 | BUFFER SORT | | 3 | 33 | 23 | +8 | 2 | 12 | | | | | | |
| 27 | TABLE ACCESS BY INDEX ROWID | PS_PWC_INDUSTR_TBL | 3 | 2 | 1 | +8 | 1 | 10 | | | | | | |
| 28 | INDEX SKIP SCAN | PS0PWC_INDUSTR_TBL | 6 | 1 | 1 | +8 | 1 | 26 | | | | | | |
| 29 | SORT AGGREGATE | | 1 | | 1 | +8 | 26 | 26 | | | | | | |
| 30 | FIRST ROW | | 1 | 1 | 1 | +8 | 26 | 26 | | | | | | |
| -> 31 | INDEX RANGE SCAN (MIN/MAX) | PS_PWC_INDUSTR_TBL | 1 | 1 | 23 | +8 | 26 | 26 | | | | | | |
| -> 32 | BUFFER SORT | | 3 | 35 | 23 | +8 | 12 | 70 | | | | | | |
| 33 | TABLE ACCESS BY INDEX ROWID | PS_UPA_FIN_REG_TBL | 3 | 2 | 1 | +8 | 1 | 6 | | | | | | |
| 34 | INDEX SKIP SCAN | PS0UPA_FIN_REG_TBL | 6 | 1 | 1 | +8 | 1 | 12 | | | | | | |
| 35 | SORT AGGREGATE | | 1 | | 1 | +8 | 12 | 12 | | | | | | |
| 36 | FIRST ROW | | 1 | 1 | 1 | +8 | 12 | 12 | | | | | | |
| -> 37 | INDEX RANGE SCAN (MIN/MAX) | PS_UPA_FIN_REG_TBL | 1 | 1 | 23 | +8 | 12 | 12 | | | | | | |
| -> 38 | BUFFER SORT | | 14 | 36 | 23 | +8 | 70 | 1870 | | | | | | |
| 39 | INDEX RANGE SCAN | PSAPWC_SUBIND_TBL | 14 | 1 | 1 | +8 | 1 | 27 | | | | | | |
| 40 | SORT AGGREGATE | | 1 | | 1 | +8 | 184 | 184 | | | | | | |
| 41 | FIRST ROW | | 1 | 2 | 1 | +8 | 184 | 184 | | | | | | |
| -> 42 | INDEX RANGE SCAN (MIN/MAX) | PS_PWC_SUBIND_TBL | 1 | 2 | 23 | +8 | 184 | 184 | | | | | | |
| 43 | BUFFER SORT | | 794 | 60 | 29 | +2 | 1870 | 13M | | | 306K | | 19.35 | Cpu (6) |
| 44 | TABLE ACCESS FULL | PS_UPA_CM_ADMIN_WL | 794 | 23 | 1 | +8 | 1 | 7052 | | | | | | |
| 45 | TABLE ACCESS FULL | PS_UPA_CM_PRE_ASGN | 3536 | 69 | | | | | | | | | | |
| 46 | INDEX RANGE SCAN | PSDUPA_CLIENT_TBL | 1 | 2 | | | | | | | | | | |
| 47 | SORT AGGREGATE | | 1 | | | | | | | | | | | |
| 48 | FIRST ROW | | 1 | 3 | | | | | | | | | | |
| 49 | INDEX RANGE SCAN (MIN/MAX) | PS_UPA_CLIENT_TBL | 1 | 3 | | | | | | | | | | |
| 50 | TABLE ACCESS BY INDEX ROWID | PS_UPA_CLIENT_TBL | 1 | 3 | | | | | | | | | | |
========================================================================================================================================================================================================
SQL>
spool offSQL> -
ArrayIndexOutOfBoundsException during query execution (COUNT() + brackets)
Hi
The following query (and almost any other query combining a "select count" and a node written with brackets) raised an ArrayIndexOutOfBoundsException :
PREFIX someinfo:<http://.......someuri/info#>
SELECT count(?item) ?kind
?item someinfo:Kind [someinfo:Value ?kind]
GROUP BY ?kind
Here is part of the stack trace.
java.lang.ArrayIndexOutOfBoundsException: 2
at com.hp.hpl.jena.graph.query.Domain.get(Domain.java:48)
at oracle.spatial.rdf.client.jena.OracleLeanQueryIter.moveToNextBinding(OracleLeanQueryIter.java:148)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.moveToNextBinding(QueryIterConvert.java:56)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.moveToNextBinding(QueryIterRepeatApply.java:76)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.nextBinding(QueryIteratorBase.java:98)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterGroup.calc(QueryIterGroup.java:50)
at com.hp.hpl.jena.sparql.engine.iterator.QueryIterGroup.<init>(QueryIterGroup.java:32)
at oracle.spatial.rdf.client.jena.OracleOpExecutor.execute(OracleOpExecutor.java:1676)
at oracle.spatial.rdf.client.jena.OracleExecutionDispatch.visit(OracleExecutionDispatch.java:341)
at com.hp.hpl.jena.sparql.algebra.op.OpGroupAgg.visit(OpGroupAgg.java:36)
at oracle.spatial.rdf.client.jena.OracleExecutionDispatch.exec(OracleExecutionDispatch.java:100)
at oracle.spatial.rdf.client.jena.OracleOpExecutor.executeOp(OracleOpExecutor.java:665)
Am I doing something wrong ?
FYI :
- the same query works perfectly fine with an in-memory Jena model
- the following query (only difference : no brackets) works fine :
PREFIX someinfo:<http://.......someuri/info#>
SELECT count(?item) ?kind
?item someinfo:Kind ?k .
?k someinfo:Value ?kind
GROUP BY ?kind
- here is the code launching the query :
String queryString;
//some code that returns the query string
Query query = QueryFactory.create(queryString, Syntax.syntaxARQ) ;
QueryExecution qexec = QueryExecutionFactory.create(query, rdfModel);
ResultSet results = qexec.execSelect() ;
Thanks
Regards
JulienHi,
This problem has been fixed already in the latest code. Basically, it is the same issue as that described in
Jena Adapter for 11g2: Wrong binding skos with preflabel and literal form
Using Jena Adaptor for Release 11.2, I was able to reproduce. After using the latest sdordfclient.jar in the classpath,
this problem went away.
Thanks,
Zhe Wu -
No Applicable Data Found during query execution !
Hi friends,
I know this question has been posted on sdn so many number of times and i have gone through all of those thread. i checked all the things menssioned in the previous thread and did accordingly, but not able to resolve this issue. Here is the details of the problem encountered:
I am trying to execute a query <b>wihout</b> any selection crieteria. after runnig for 10-15 secs i am getting the following message:
"No Applicable Data Found."
I went to the Infocube manage and checked all the requests are green and "Request for reporting availble" option is also checked for each and every request loaded.
I checked the LISTCUBE Tcode and checked that the data is there.
Any idea how to fix this thing?
manmitThanks Bhabu for ur quick reply..actually i am in Production and so i can not remove that filter from the query design. we are using "Current calander month" as the filter. and when i go to the LISTCUBE. how can i put the same filter in LISTCUBE as i can see the date in the list cube upto only 2006 year.
I think it is not getting data because of this filter...as the current month filter takes the data of current month and there is not data for this month in the cube i guess. plz correct me if i am wrong..
assigned points for ur help already...
Manmit -
Colon authorization / note 1140831 - Colon authorization during query execution
Hi experts
We have designed HR-analysis authorizations, authorization relevant characteristic 0ORGUNIT.
These authorizations work well if there is a variable (authorization type) on 0ORGUNIT in the query.
If this variable or the characteristic is not an element of the query, SAP asks you for a colon ":" authorization for the aggregation of the result.
We have created such an authorization manually and assigend it to one of the test users:
Executing the query via RSECADMIN the query result shows ALL possible records of the infoprovider (cube).
This is not the expected result.
Do you have an idea why the system works like this? Where is the error?
Thanksproblem is fixed:
You need to have the variable of authorization type in the BEx query.
Maybe you are looking for
-
How to get selection criteria value in method IF_POWL_FEEDER~HANDLE_ACTION
hi: As you know, we could get the leading selected POWL result data through parameter c_selected and c_selected in this method. but moreever, I want to get the selection criterai values in this method too just like the paramter i_selcrit_values in
-
i have in my imac new hdd. Servis changed for me without installing osx. Now when put in osx dvd and hold down c key, nothing happen and dvd comes out. Any solution for it? Thank zou guys... Mac os version 10.6.2.
-
Hello I want to place an image in a jtable. How can I do this because when I tried it I only saw the link to the file
-
How to change the value of a color picker?
Hi *, I am currently working on a small project and I would like to use the colorpicker. When I initialize the colorpicker the, the widget is updated and shows the correct color, but when I try to change the value at runtime, nothing happens. Did I m
-
Since the upgrade on Samsung S3, the automatic/system time is 30 minutes off?! I set it manually however since i travel often this is not a long term solution - Is Verizon really behind the rest of us in time?