Zimbra login is very slow - SQL query takes 35+ seconds
Hi,
my Zimbra login process remains very slow, 35-40 seconds with only a single user using it. I have Beehive set up as directory synchronized, with about 6500 users in it. However, I and a couple of colleagues the only ones making any use of it for testing. With just one person logging in, the following SQL query takes about 35 seconds to execute:
SELECT /*+ LEADING(rf rf_pp) USE_NL(rf_pp) INDEX_ASC(@rf_connect_by rf@rf_connect_by (ws_real_folders.parent_eid ws_real_folders.eid)) */ RF.ENTERPRISE_ID AS
ENTERPRISE_ID, RF.SITE_ID AS SITE_ID, RF.ENTITY_TYPE AS ENTITY_TYPE, RF.EID AS EID, RF.LOCK_ID AS LOCK_ID, RF.CACHE_ID AS CACHE_ID, RF.CACHE_TS AS
CACHE_TS, RF.CACHE_SQ AS CACHE_SQ, FLOOR(RF.SECURE_CHECK/10) AS ACCESS_TYPES, RF.PARENT_ENTITY_TYPE AS PARENT_ENTITY_TYPE, RF.PARENT_EID AS
PARENT_EID, RF.NAME AS NAME, RF.OWNER_ENTITY_TYPE AS OWNER_ENTITY_TYPE, RF.OWNER_EID AS OWNER_EID, RF.CREATED_ON AS CREATED_ON,
RF.CREATOR_ENTITY_TYPE AS CREATOR_ENTITY_TYPE, RF.CREATOR_EID AS CREATOR_EID, RF.MODIFIEDON AS MODIFIED_ON, RF.MODIFIED_BY_ENTITY_TYPE AS
MODIFIED_BY_ENTITY_TYPE, RF.MODIFIED_BY_EID AS MODIFIED_BY_EID, RF.VISIBILITY AS VISIBILITY, CASE WHEN (BITAND(:B13 , :B12 ) = :B12 ) THEN CAST(MULTISET(
SELECT METADATA_CEN
FROM OCS_ENTITY_METADATA_CENS_2_V META
WHERE META.ENTITY_EID = RF.EID ) AS OCS_COLLAB_ID_TBL_T) ELSE CAST(NULL AS OCS_COLLAB_ID_TBL_T) END AS METADATA_CENS, CASE WHEN
RF_PP.LAST_ACCESSED IS NULL THEN 'N' WHEN RF.MODIFIEDON > RF_PP.LAST_ACCESSED THEN 'U' ELSE NVL(RF_PP.RELATIVE_STATUS, 'N') END AS CHANGE_STATUS,
RF.PROPERTIES AS PROPERTIES_CLOB, RF_PP.PROPERTIES AS VIEWERPROPERTIES_CLOB, RF.DESCRIPTION AS DESCRIPTION
FROM (
SELECT /*+ QB_NAME(rf_connect_by) no_connect_by_cost_based */ RF.ENTERPRISE_ID ENTERPRISE_ID, :B4 SITE_ID, :B3 ENTITY_TYPE, RF.EID EID, RF.LOCK_ID LOCK_ID,
RF.ORA_ROWSCN CACHE_ID, RF.CACHE_TS CACHE_TS, RF.CACHE_SQ CACHE_SQ, RF.PARENT_TYPE PARENT_ENTITY_TYPE, RF.PARENT_EID PARENT_EID, RF.NAME
NAME, RF.OWNER_TYPE OWNER_ENTITY_TYPE, RF.OWNER_EID OWNER_EID, RF.CREATED_ON CREATED_ON, RF.CREATOR_TYPE CREATOR_ENTITY_TYPE,
RF.CREATOR_EID CREATOR_EID, RF.MODIFIED_ON MODIFIEDON, RF.MODIFIED_BY_TYPE MODIFIED_BY_ENTITY_TYPE, RF.MODIFIED_BY_EID MODIFIED_BY_EID,
RF.VISIBILITY VISIBILITY, RF.PROPERTIES PROPERTIES, RF.DESCRIPTION DESCRIPTION, RF.IS_HIDDEN IS_HIDDEN, LEVEL LEVEL_NUM, COALESCE (
(SELECT :B10 * 10 + 1
FROM AC_ENTITIES AEI
WHERE RF.EID = AEI.EID AND ( 1 = DECODE(AEI.SENSITIVITY_EID, :B9 , 1, 0) AND 1 = DECODE(AEI.OWNER_EID, :B8 , 1, 0) AND 1 = DECODE(AEI.AT_READ, :B7 , 1, 0) AND 1 =
DECODE(AEI.AT_DISCOVER, :B6 , 1, 0) AND 1 = DECODE(AEI.LOCAL_ACL_ID, :B5 , 1, 0) ) ) ,
(SELECT ACV.ACCESS_TYPES * 10 + ACV.IS_ALLOWED
FROM AC_CHECK_ONE_OF_V ACV
WHERE ACV.EID = RF.EID ) ) SECURE_CHECK
FROM WS_REAL_FOLDERS RF
WHERE RF.IS_HIDDEN = :B2 START WITH RF.PARENT_EID = :B1 CONNECT BY PRIOR RF.EID = RF.PARENT_EID ) RF, WS_RF_PRVT_PROPERTIES RF_PP
WHERE RF.EID = RF_PP.EID (+) AND :B11 = RF_PP.VIEWER_EID (+) AND 1 = BITAND(RF.SECURE_CHECK, 1) ORDER BY RF.LEVEL_NUMIt has ID atrvjdrmz2v6d in Enterprise Manager, and I've tried tuning it with the SQL tuning advisor in EM. I did the statistics gathering mentioned in another thread yesterday, to see if that helped - doesn't seem liked it. I'm running Database 11.1.0.6 and Beehive 1.5.1 in the build from the day it released.
Any hints? I'll post this to MetaLink as well, unless someone has some immediate idea what's wrong :-)
No speedup, the 35-40 seconds is for normal logins - and it's very consistent, at least if the database is otherwise idle. Immediately logging out and back in gives me the same wait, and the same query shows up in the Enterprise Manager interface.
It seems it might be related to Workspaces - from EM:
"PL/SQL Source (Line Number) BEE_CODE.WS_REAL_FOLDER_PKG (2998)"
Similar Messages
-
A workaround was suggested by a member of the community to turn off both hardware and Flash acceleration. It worked fine (no crashes since), but runs very slowly. In particular, takes five seconds to exit and is often still listed as a running process. Very slow in connecting to Web pages, and very slow loading them because of the graphics. Very slow in loading video. I expected slower responses, but this is REALLY slow. I'm running 64-bit Windows 7 and an Nvidia GE Force 7800 graphics card with all the drivers updated and the plugins for Firefox mostly set on "ask to activate". Should I expect this much reduction in performance when the workaround I mentioned was put into place? If so, it's half a loaf at best. The only thing questionable is that I have two Youtube downloaders that I am trying, but I made the assumption that these were only applied when you downloaded something from Youtube.
In case you are using "Clear history when Firefox closes": do not clear the Cookies
If you clear cookies then Firefox will also try to remove cookies created by plugins and that requires to start plugin-container processes that can slow down closing Firefox.
Instead let the cookies expire when Firefox is closed to make them session cookies.
*Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: Keep until: "I close Firefox" -
Very Slow SQL query - Fast in SSMS
We have a very simple query that executes instantly in SSMS, returning about 45,000 rows. Whenever I run the same query on a CFM page it takes about 47 seconds to execute.
I've tried reindexing, turning it into a stored procedure, etc.. but nothing seems to help. My other queries are also running a little slower, but not nearly as noticeable because they are smaller queries.
I have an additional CF10 server that seems to run the query perfectly fine on a test page.
The query is pretty much this:
Select X,Y,Z
FROM TABLE
WHERE BLAH BLAH BLAH
Can someone offer me some advice on what can cause this or how to find the issue?
Thanks!Just an update. It ended up being "something" to do with the CF machine, although still not sure what exactly.
Ended up solving the issue by installing CF on identical hardware and patching to the same windows and CF versions. The site is now running like a champ and loading pages in less than 1 second.
Steve, I have a dynamic filter that I run a query of query on the 45k rows to generate. Once the first option is selected, it takes the distinct rows from the original query were x = selection and there can be 10-12 sub options to narrow down inside of that data. It seems to load much faster this way than by returning to SQL server each time a response is selected.
Thanks for your suggestions. Hopefully we don't have the issue again... whatever it was. -
I cannot type properly in applications because each key jams and takes a long time to load on the screen. It is very frustrating!
sarahlawrie333 wrote:
Yeah, I essentially can't use the phone and have no idea what to do!
Um, most intelligent people would stop whining and read then follow the troubleshooting steps in the thread to which they replied.
Of course, there's always basic troubleshooting from the User's Guide which is reset, restart, restore (first from backup then as new). Try each of these in order until the issue is fixed.
sarahlawrie333 wrote:
Hoping they fix it soon.
Again, fix it yourself. There is nothing for Apple to fix as the issue does not affect all iPhones, merely a fraction of less than 1%. -
my MacBook pro slowdown, very very slow, it will take seconds to type a letter in.
See:
Mac Maintenance Quick Assist,
Mac OS X speed FAQ,
Speeding up Macs,
How to Speed up Macs,
Macintosh OS X Routine Maintenance,
Mac troubleshooting: What to do when your computer is too slow,
Essential Mac Maintenance: Get set up,
Essential Mac Maintenance: Rev up your routines,
Maintaining OS X,
Five Mac maintenance myths and
Myths of required versus not required maintenance for Mac OS X for information. -
Hi all,
I have two Windows 2000 Servers:
1. Compaq Server with one 2.4G CPU, 1G RAM and 30G harddisk
2. Acer Server with one 2.4G CPU, 1G RAM and 30G harddisk
The software configuration of two server are identical, they both have:
1 Windows 2000 Server with SP3
2 Oracle 8i ( Oracle configuration(such SGA, buffer size, etc...) are also identical
But I found two strange things I cannot explain.
1.)
When I local(not throuhg network) login Oracle on Compaq Server, it only takes no more than 1second to login. But When I local login Oracle on Acer Server it takes about 3 seconds to logon.
2.)
I local login to Oracle on Acer Server, and followed by executing a query which involves external procedure call, it takes 5 seconds to finish that query. In the same session, I executed the same query again and again, it only took 2 seconds to complete. I donot know why the first execution of a query (with external procedure call) takes longer time. It seems Oracle takes some time to load the external procedure service in Acer server. Again the strange thing, there is not such issue in Compaq Server, no matter when I execute the same query, it always take 2 seconds.
Could any one tell me why Oracle on Acer Server has slow response in certain situations (e.g Logon , and run first query involve external procedure). And any solution to solve the problem?
Thanks in advance.
FrankCould any one tell me why Oracle on Acer Server has slow response in certain situations (Maybe that's why Compaq charge more than Acer.
Cheers, APC -
SSRS report running very slow but query is very fast in SSMS
I am running a very basic report. I am just retrieving some data from a table and I am using a parameter in the Where clause of the query. The query runs fast (in less than 5 secs) if I hardcode the parameter in the SSRS query but if it's left as a dynamically
chosen parameter the query takes over 5 minutes to render. I have read a little about "Parameter Sniffing" but I am not sure if that applies to my case since I am only using a TSQL query and not a SP.
Any feedback would be appreciated.
PS: My query looks like below:
Select Col1, Count(*)
From Tbl1
Where Col2 = @Para1
Group By Col1
KKHi Kk,
Is your data retrieval takes time or report rendering takes time? Run this query in your report server database to get the above two. Select * From Executionlog2
Check the timings data retrieval time, processing time, and report rendering time.
If data retrieval takes time,
Give some default values to filters (parameters).
If parameter rendering takes time
Choose different options for parameter selection. Instead of multiselction of parameter, use like etc.
Let me know which causing this problem after running the SQL profiler or executionlog query so that I can help you more. Or you can use SQL profiler to check what query takes more time.
Hope this helps.
Regards,
Charlie Liao
TechNet Community Support -
Help with a very slow sql statement
Hi this statement takes 10 seconds to run and is run a lot, can anyone help me speed it up.
Each section in itself is quick but when i add the IN section it slows down, probably because there is 20291 rows in the view v_allitems.
anyone know how i can speed up?
select ITEMTYPE,
ITEMID,
NOTESID,
NOTES,
DUEDATE,
OPENDATE,
SUBJECT,
TYPE,
STATUS,
OWNER,
CREATEBY,
CREATEDATE,
ITEMCODE
FROM v_allitems
where
ITEMCODE in ( 'ACT,'||4264) OR ITEMCODE IN
(SELECT pcchildcode
||','
|| pcchild item
FROM afpc
CONNECT BY pcparent = prior pcchild
AND pcparentcode = prior pcchildcode START
WITH pcparent = 232
AND pcparentcode = 'CAS'
UNION ALL
SELECT pcparentcode
||','
|| pcparent item
FROM afpc
CONNECT BY pcchild = prior pcparent
AND pcchildcode = prior pcparentcode START
WITH pcchild =4264
AND pcchildcode = 'ACT'
)Something to just try i guess (wild guessing here).
WITH
itemcodes AS
SELECT
DISTINCT ItemCode
FROM
SELECT 'ACT,' || 4264 AS ItemCode
FROM DUAL
UNION ALL
SELECT pcchildcode || ',' || pcchild item AS ItemCode
FROM afpc
CONNECT BY pcparent = prior pcchild
AND pcparentcode = prior pcchildcode
START WITH pcparent = 232
AND pcparentcode = 'CAS'
UNION ALL
SELECT pcparentcode || ',' || pcparent item AS ItemCode
FROM afpc
CONNECT BY pcchild = prior pcparent
AND pcchildcode = prior pcparentcode
START WITH pcchild = 4264
AND pcchildcode = 'ACT'
SELECT
v.ITEMTYPE,
v.ITEMID,
v.NOTESID,
v.NOTES,
v.DUEDATE,
v.OPENDATE,
v.SUBJECT,
v.TYPE,
v.STATUS,
v.OWNER,
v.CREATEBY,
v.CREATEDATE,
v.ITEMCODE
FROM v_allitems v, itemcodes i
WHERE v.ItemCode = i.ItemCode;Assuming (probably a good assumption) that's not good, how long does this query take to finish for you?
SELECT pcchildcode || ',' || pcchild item AS ItemCode
FROM afpc
CONNECT BY pcparent = prior pcchild
AND pcparentcode = prior pcchildcode
START WITH pcparent = 232
AND pcparentcode = 'CAS'
UNION ALL
SELECT pcparentcode || ',' || pcparent item AS ItemCode
FROM afpc
CONNECT BY pcchild = prior pcparent
AND pcchildcode = prior pcparentcode
START WITH pcchild = 4264
AND pcchildcode = 'ACT' -
Master is very Slow, Because Slave Takes 20 minutes for "startup done"
I have two db env to be backup for each other. I stopped one db env for 5 minutes, then restarted it. I found that it took over 20 minutes to receive the db callback event "startup done". During these time, there were transactions in the master db env. I guess this makes the sync_up process take so long time.
I used the ack policy "DB_REPMGR_ACKS_ONE_PEER" and used "txn no sync" flag for transaction, so during these 25 minutes, master is very slow.
My requirement is master can resume its performance as soon as slave comes back. Can slave accept the log before its sync completed? Or any other way to solve this issue?Most likely what happened is that the stopped dbenv is the only site/peer able to
send the acknowledgement. If it is stopped but not disconnected, then the master
will wait the full ACK timeout for every txn.
It is also likely that during that 5 minutes, log files were archived and when the
stopped dbenv became active again, it had to perform an internal initialization
from scratch. That copies over every page of every database and then the logs
needed to resynchronize. If you have a lot and/or very large database files,
that can take a long time.
The client cannot send any acks until it completes its synchronization. One
way to avoid this would be to perform a manual hot backup to the client before
starting up the application. You would have to copy over all database files, then
all log files from the master (in that order) and then run catastrophic recovery
in that client directory. Then start up your application and the client should be
able to quickly synchronize.
You can control this in the application by setting DB_REP_CONF_NOAUTOINIT
to DB_ENV->rep_set_config. You'll get back an error that tells you that the site
needs an re-initialization and you can do that copying then.
Sue LoVerso
Oracle -
Urgent: WAD performance is very slow than query performance
Hi,
If i execute the report(using query with variables) which contains 8,50,000 records in WAD then its taking more than 900 seconds and say Connection timed out at the end.
If i execute the same query in Query designer using Web browser then it will take 400 seconds to show all the data in hierarchy or tabular view.
I've done tuning using RSRT on query read mode and persistent mode etc..
Can you please help me?
THanks in advance. Points will be given...
Reg,
VarunVarun,
Did you ever solve the performance issue of WAD report. We are having the same issue of WAD performance lot slower than executing just as a Query.
Thanks -
My BB Z30 very slow charging it take 8 hours full charging
It is always recommended that BlackBerry users use BlackBerry branded accessories that come with the device. You should use the BlackBerry charger that came with the device. When charging a BlackBerry smartphone (Z30, Passport, Leap etc) with large batteries, it may take a while to fully charge the battery. Basically bigger batteries take longer to charge. I would say 8 hours to fully charge a BlackBerry Z30 is about right. For me personally I would leave my BlackBerry device charging longer.
Dear Sir !my bbz30 very slow charging it full charge in 8 hours please help me. i have charger 2amp charger. please tell which amp best fast charging for my bbz30. thank you
-
Simple finder results in huge slow sql query -- why WHERE clause?
Hi all,
wondering about the poor performance of my finder methods I took a look into the SQL that went to the database.
"SELECT DISTINCT OBJECT(p) FROM Person p"
results in
SELECT PersonID, FirstName, LastName, [etc.] FROM person WHERE (PersonID='5354B71CC0A80113008BD3BB11A57FA1') OR (PersonID='5354B893C0A80113008BD3BB3C6918FF') OR (PersonID='5354B910C0A80113008BD3BBC83093BE') OR [etc.]
where all 2000 primary keys are listed. This query costs ~ 4 seconds on my box.
A query without WHERE costs ~ 0 seconds. So why this "WHERE" clause?
Is this a JBoss specific problem? I am using version 3.2.3.
thanx!
MarcusIt's not a bug - it's how JBoss implements it's own
"findAll" methodology. Whether it's a good
implementation or not is open to debate.Really strange.
Anyway all my performance problems disappeared with setting the read-ahead strategy to "on-find". Although I don't fully understand why.
Marcus -
Urgent: WAD performance is very slow than query level execution
Hi,
If i execute the report(using query with variables) which contains 8,50,000 records in WAD then its taking more than 900 seconds and say Connection timed out at the end.
If i execute the same query in Query designer using Web browser then it will take 400 seconds to show all the data in hierarchy or tabular view.
I've done tuning using RSRT on query read mode and persistent mode etc..
Can you please help me?
THanks in advance. Points will be given...
Reg,
VarunPlease advice...
or
Send some usefule links.
Regards,
Varun -
Ipad agenda very slow when activated takes long time
My agenda is very slow when i activated them takesnlongbtime when it is visible.?
How to solve this?You could try a reset of the iPad, but that could also be due to the servers you are connecting to that contain the calendar information (assuming you are synching to one or more), your Internet connection itself, and then number of items and calendars in the app.
-
Query Takes 43 seconds to retrieve 650 records
Hi,
We have Query which takes 43 seconds to retrieve 650 records.We are on 10.2.0.4 version.Kindly Suggest me any changes is required.
SELECT InstrumentID, MEGroupID, MessageSequence FROM TIBEX_msgseqbyinstrumentbymeid WHERE MEGroupID = 'ME1';
PLAN_TABLE_OUTPUT
Plan hash value: 1364023912
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 25 | 1550 | 56585 (2)| 00:11:20 |
| 1 | HASH GROUP BY | | 25 | 1550 | 56585 (2)| 00:11:20 |
|* 2 | HASH JOIN | | 3272 | 198K| 56584 (2)| 00:11:20 |
|* 3 | TABLE ACCESS FULL | TIBEX_INSTRUMENT | 677 | 14894 | 18 (0)| 00:00:01 |
| 4 | VIEW | | 5689 | 222K| 56565 (2)| 00:11:19 |
| 5 | UNION-ALL | | | | | |
| 6 | HASH GROUP BY | | 614 | 11052 | 4587 (2)| 00:00:56 |
| 7 | TABLE ACCESS FULL | TIBEX_QUOTE | 455K| 8008K| 4564 (1)| 00:00:55 |
| 8 | HASH GROUP BY | | 108 | 1944 | 50283 (2)| 00:10:04 |
| 9 | TABLE ACCESS FULL | TIBEX_ORDER | 4926K| 84M| 50001 (1)| 00:10:01 |
| 10 | HASH GROUP BY | | 52 | 936 | 8 (13)| 00:00:01 |
|* 11 | TABLE ACCESS FULL | TIBEX_EXECUTION | 307 | 5526 | 7 (0)| 00:00:01 |
| 12 | HASH GROUP BY | | 1 | 40 | 3 (34)| 00:00:01 |
|* 13 | TABLE ACCESS FULL | TIBEX_TSTRADE | 1 | 40 | 2 (0)| 00:00:01 |
| 14 | HASH GROUP BY | | 396 | 7128 | 13 (8)| 00:00:01 |
| 15 | INDEX FAST FULL SCAN| IX_BESTEXREL | 3310 | 59580 | 12 (0)| 00:00:01 |
| 16 | HASH GROUP BY | | 1125 | 20250 | 12 (9)| 00:00:01 |
|* 17 | TABLE ACCESS FULL | TIBEX_MERESUMEPRDTRANSITION | 1981 | 35658 | 11 (0)| 00:00:01 |
| 18 | HASH GROUP BY | | 1 | 17 | 4 (25)| 00:00:01 |
| 19 | TABLE ACCESS FULL | TIBEX_EDPUPDATEREJECT | 10 | 170 | 3 (0)| 00:00:01 |
| 20 | HASH GROUP BY | | 1126 | 32654 | 822 (1)| 00:00:10 |
| 21 | NESTED LOOPS | | 8640 | 244K| 821 (1)| 00:00:10 |
| 22 | TABLE ACCESS FULL | TIBEX_INSTRUMENTADMIN | 17280 | 421K| 820 (1)| 00:00:10 |
|* 23 | INDEX UNIQUE SCAN | XPKTIBEX_CONFIGMEGROUP | 1 | 4 | 0 (0)| 00:00:01 |
| 24 | HASH GROUP BY | | 17 | 306 | 70 (3)| 00:00:01 |
| 25 | TABLE ACCESS FULL | TIBEX_BESTEXECPRICELOG | 12671 | 222K| 68 (0)| 00:00:01 |
| 26 | HASH GROUP BY | | 1 | 40 | 3 (34)| 00:00:01 |
|* 27 | TABLE ACCESS FULL | TIBEX_AUCTIONPRICE | 1 | 40 | 2 (0)| 00:00:01 |
| 28 | HASH GROUP BY | | 1126 | 19142 | 618 (1)| 00:00:08 |
|* 29 | TABLE ACCESS FULL | TIBEX_ADMINACK | 18121 | 300K| 616 (1)| 00:00:08 |
| 30 | HASH GROUP BY | | 1122 | 20196 | 142 (2)| 00:00:02 |
| 31 | INDEX FAST FULL SCAN| INSTRUMENTSTATEMSGSEQ | 23588 | 414K| 140 (0)| 00:00:02 |
Predicate Information (identified by operation id):
2 - access("INSTRUMENTID"="B"."INSTRUMENTID")
3 - filter("B"."MEGROUPID"='ME1')
11 - filter("INSTRUMENTID" IS NOT NULL)
13 - filter("INSTRUMENTID" IS NOT NULL)
17 - filter("INSTRUMENTID" IS NOT NULL)
23 - access("ADMINUSER"="MEGROUPID")
27 - filter("INSTRUMENTID" IS NOT NULL)
29 - filter("INSTRUMENTID" IS NOT NULL)
50 rows selected.
654 rows selected.
Elapsed: 00:00:43.67
CREATE OR REPLACE VIEW TIBEX_MSGSEQBYINSTRUMENTBYMEID
(INSTRUMENTID, MESSAGESEQUENCE, MEGROUPID)
AS
SELECT a.*, b.megroupid
FROM TIBEX_MSGSEQBYINSTRUMENT a
JOIN tibex_instrument b
ON a.instrumentid=b.instrumentid
CREATE OR REPLACE VIEW TIBEX_MSGSEQBYINSTRUMENT
(INSTRUMENTID, MESSAGESEQUENCE)
AS
SELECT instrumentID, NVL(max(MessageSequence),0) as MessageSequence
FROM (SELECT instrumentID, max(MessageSequence) as MessageSequence
FROM tibex_quote
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_order
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_execution
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_TsTrade
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_BestExRel
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_MeResumePrdTransition
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_EDPUpdateReject
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_INSTRUMENTADMIN
WHERE instrumentID IS NOT NULL
AND adminuser IN (
SELECT megroupID
FROM tibex_configMeGroup
GROUP by instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_BestExecPriceLog
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_auctionPrice
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(AckMessageSequence)
FROM tibex_adminAck
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
UNION ALL
SELECT instrumentID, max(MessageSequence)
FROM tibex_InstrumentState
WHERE instrumentID IS NOT NULL
GROUP BY instrumentID
GROUP BY instrumentID
/Regards
NarasimhaHi,
I dropped and recreated the stats without any modification(Eg adding new Indexes).The Query is hitting the indexes and it comes out in 00:00:16.86.But in the Production box the Same Query is doing Full tablescan.
The only difference in producation and Test Env is I collected the Fresh stats but in prod Kindly read below and give me suggestion
The Process Happens
In the Beginning of the Day Following tables contains Like 100 records and as the day process it will reach 1,2,3,4 millions records by the EOD.During the EOD day we generate stats and delete those records and Tables will have 100 or 200 records but the stats will be for 4 Million records.Kindly Suggest me the best option
tst_pre_eod@MIFEX3> set timing on
tst_pre_eod@MIFEX3> show parameter user_dump_dest
NAME TYPE VALUE
user_dump_dest string /u01/app/oracle/admin/MIFEX3/u
dump
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.4
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 128
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> column sname format a20
tst_pre_eod@MIFEX3> column pname format a20
tst_pre_eod@MIFEX3> column pval2 format a20
tst_pre_eod@MIFEX3>
tst_pre_eod@MIFEX3> select
2 sname
3 , pname
4 , pval1
5 , pval2
6 from
7 sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 01-11-2010 17:16
SYSSTATS_INFO DSTOP 01-11-2010 17:16
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 1489.10722
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM .71
SYSSTATS_MAIN MREADTIM 15.027
SYSSTATS_MAIN CPUSPEED 2141
SYSSTATS_MAIN MBRC 29
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.
Elapsed: 00:00:00.07
tst_pre_eod@MIFEX3> set timing on
tst_pre_eod@MIFEX3> explain plan for
2
tst_pre_eod@MIFEX3> SELECT InstrumentID, MEGroupID, MessageSequence FROM
2 TIBEX_msgseqbyinstrumentbymeid WHERE MEGroupID = 'ME1';
GLJd ME1 2.9983E+18
TALKl ME1 2.9983E+18
ENGl ME1 2.9983E+18
AGRl ME1 2.9983E+18
HHFAd ME1 2.9983E+18
GWI1d ME1 2.9983E+18
BIO3d ME1 2.9983E+18
603 rows selected.
Elapsed: 00:00:16.72
tst_pre_eod@MIFEX3> SELECT InstrumentID, MEGroupID, MessageSequence FROM
2 TIBEX_msgseqbyinstrumentbymeid WHERE MEGroupID = 'ME1';
603 rows selected.
Elapsed: 00:00:16.86
Execution Plan
Plan hash value: 2206731661
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 13 | 806 | 111K (5)| 00:01:20 |
| 1 | HASH GROUP BY | | 13 | 806 | 111K (5)| 00:01:20 |
|* 2 | HASH JOIN | | 3072 | 186K| 111K (5)| 00:01:20 |
|* 3 | TABLE ACCESS FULL | TIBEX_INSTRUMENT | 626 | 13772 | 28 (0)| 00:00:01 |
| 4 | VIEW | | 5776 | 225K| 111K (5)| 00:01:20 |
| 5 | UNION-ALL | | | | | |
| 6 | HASH GROUP BY | | 782 | 14076 | 10056 (5)| 00:00:08 |
| 7 | TABLE ACCESS FULL | TIBEX_QUOTE | 356K| 6260K| 9860 (3)| 00:00:08 |
| 8 | HASH GROUP BY | | 128 | 2304 | 101K (5)| 00:01:12 |
| 9 | VIEW | index$_join$_007 | 3719K| 63M| 98846 (3)| 00:01:11 |
|* 10 | HASH JOIN | | | | | |
| 11 | INDEX FAST FULL SCAN| IX_ORDERBOOK | 3719K| 63M| 32019 (3)| 00:00:23 |
| 12 | INDEX FAST FULL SCAN| TIBEX_ORDER_ID_ORD_INS | 3719K| 63M| 24837 (3)| 00:00:18 |
| 13 | HASH GROUP BY | | 23 | 414 | 4 (25)| 00:00:01 |
| 14 | VIEW | index$_join$_008 | 108 | 1944 | 3 (0)| 00:00:01 |
|* 15 | HASH JOIN | | | | | |
| 16 | INDEX FAST FULL SCAN| TIBEX_EXECUTION_IDX1 | 108 | 1944 | 1 (0)| 00:00:01 |
|* 17 | INDEX FAST FULL SCAN| TIBEX_EXECUTION_IDX4 | 108 | 1944 | 1 (0)| 00:00:01 |
| 18 | HASH GROUP BY | | 1 | 40 | 4 (25)| 00:00:01 |
|* 19 | TABLE ACCESS FULL | TIBEX_TSTRADE | 1 | 40 | 3 (0)| 00:00:01 |
| 20 | HASH GROUP BY | | 394 | 7092 | 30 (10)| 00:00:01 |
| 21 | INDEX FAST FULL SCAN | IX_BESTEXREL | 4869 | 87642 | 28 (4)| 00:00:01 |
| 22 | HASH GROUP BY | | 1126 | 20268 | 19 (11)| 00:00:01 |
|* 23 | TABLE ACCESS FULL | TIBEX_MERESUMEPRDTRANSITION | 1947 | 35046 | 17 (0)| 00:00:01 |
| 24 | HASH GROUP BY | | 1 | 17 | 7 (15)| 00:00:01 |
| 25 | TABLE ACCESS FULL | TIBEX_EDPUPDATEREJECT | 8 | 136 | 6 (0)| 00:00:01 |
| 26 | HASH GROUP BY | | 1099 | 31871 | 192 (6)| 00:00:01 |
|* 27 | HASH JOIN | | 6553 | 185K| 188 (4)| 00:00:01 |
| 28 | INDEX FULL SCAN | XPKTIBEX_CONFIGMEGROUP | 4 | 16 | 1 (0)| 00:00:01 |
| 29 | TABLE ACCESS FULL | TIBEX_INSTRUMENTADMIN | 14744 | 359K| 186 (4)| 00:00:01 |
| 30 | HASH GROUP BY | | 11 | 198 | 77 (7)| 00:00:01 |
| 31 | TABLE ACCESS FULL | TIBEX_BESTEXECPRICELOG | 5534 | 99612 | 74 (3)| 00:00:01 |
| 32 | HASH GROUP BY | | 1 | 40 | 4 (25)| 00:00:01 |
|* 33 | TABLE ACCESS FULL | TIBEX_AUCTIONPRICE | 1 | 40 | 3 (0)| 00:00:01 |
| 34 | HASH GROUP BY | | 1098 | 18666 | 193 (7)| 00:00:01 |
|* 35 | TABLE ACCESS FULL | TIBEX_ADMINACK | 15836 | 262K| 185 (3)| 00:00:01 |
|* 35 | TABLE ACCESS FULL | TIBEX_ADMINACK | 15836 | 262K| 185 (3)| 00:00:01 |
| 36 | HASH GROUP BY | | 1112 | 20016 | 76 (16)| 00:00:01 |
| 37 | INDEX FAST FULL SCAN | INSTRUMENTSTATEMSGSEQ | 20948 | 368K| 66 (4)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("INSTRUMENTID"="B"."INSTRUMENTID")
3 - filter("B"."MEGROUPID"='ME1')
10 - access(ROWID=ROWID)
15 - access(ROWID=ROWID)
17 - filter("INSTRUMENTID" IS NOT NULL)
19 - filter("INSTRUMENTID" IS NOT NULL)
23 - filter("INSTRUMENTID" IS NOT NULL)
27 - access("ADMINUSER"="MEGROUPID")
33 - filter("INSTRUMENTID" IS NOT NULL)
35 - filter("INSTRUMENTID" IS NOT NULL)
Statistics
175 recursive calls
0 db block gets
57737 consistent gets
18915 physical reads
0 redo size
14908 bytes sent via SQL*Net to client
558 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
603 rows processed
SELECT InstrumentID, MEGroupID, MessageSequence FROM
TIBEX_msgseqbyinstrumentbymeid WHERE MEGroupID = 'ME1'
call count cpu elapsed disk query current rows
Parse 1 0.01 0.07 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 8 10.46 16.28 18915 57733 0 603
total 10 10.47 16.35 18915 57733 0 603
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 303
Rows Row Source Operation
603 HASH GROUP BY (cr=57733 pr=18915 pw=18900 time=16283336 us)
2853 HASH JOIN (cr=57733 pr=18915 pw=18900 time=281784 us)
626 TABLE ACCESS FULL TIBEX_INSTRUMENT (cr=38 pr=0 pw=0 time=120 us)
5594 VIEW (cr=57695 pr=18915 pw=18900 time=278405 us)
5594 UNION-ALL (cr=57695 pr=18915 pw=18900 time=278400 us)
823 HASH GROUP BY (cr=12938 pr=0 pw=0 time=272798 us)
356197 TABLE ACCESS FULL TIBEX_QUOTE (cr=12938 pr=0 pw=0 time=41 us)
136 HASH GROUP BY (cr=43989 pr=18915 pw=18900 time=15962878 us)
3718076 VIEW index$_join$_007 (cr=43989 pr=18915 pw=18900 time=13123768 us)
3718076 HASH JOIN (cr=43989 pr=18915 pw=18900 time=9405689 us)
3718076 INDEX FAST FULL SCAN IX_ORDERBOOK (cr=24586 pr=0 pw=0 time=65 us)(object id 387849)
3718076 INDEX FAST FULL SCAN TIBEX_ORDER_ID_ORD_INS (cr=19403 pr=0 pw=0 time=64 us)(object id 387867)
23 HASH GROUP BY (cr=6 pr=0 pw=0 time=1265 us)
108 VIEW index$_join$_008 (cr=6 pr=0 pw=0 time=1024 us)
108 HASH JOIN (cr=6 pr=0 pw=0 time=914 us)
108 INDEX FAST FULL SCAN TIBEX_EXECUTION_IDX1 (cr=3 pr=0 pw=0 time=155 us)(object id 386846)
108 INDEX FAST FULL SCAN TIBEX_EXECUTION_IDX4 (cr=3 pr=0 pw=0 time=129 us)(object id 386845)
0 HASH GROUP BY (cr=3 pr=0 pw=0 time=84 us)
0 TABLE ACCESS FULL TIBEX_TSTRADE (cr=3 pr=0 pw=0 time=46 us)
394 HASH GROUP BY (cr=39 pr=0 pw=0 time=2662 us)
4869 INDEX FAST FULL SCAN IX_BESTEXREL (cr=39 pr=0 pw=0 time=22 us)(object id 386757)
1126 HASH GROUP BY (cr=23 pr=0 pw=0 time=2338 us)
1947 TABLE ACCESS FULL TIBEX_MERESUMEPRDTRANSITION (cr=23 pr=0 pw=0 time=29 us)
1 HASH GROUP BY (cr=7 pr=0 pw=0 time=110 us)
8 TABLE ACCESS FULL TIBEX_EDPUPDATEREJECT (cr=7 pr=0 pw=0 time=43 us)
828 HASH GROUP BY (cr=249 pr=0 pw=0 time=6145 us)
828 HASH JOIN (cr=249 pr=0 pw=0 time=1008 us)
4 INDEX FULL SCAN XPKTIBEX_CONFIGMEGROUP (cr=1 pr=0 pw=0 time=21 us)(object id 386786)
14905 TABLE ACCESS FULL TIBEX_INSTRUMENTADMIN (cr=248 pr=0 pw=0 time=23 us)
11 HASH GROUP BY (cr=99 pr=0 pw=0 time=3728 us)
5556 TABLE ACCESS FULL TIBEX_BESTEXECPRICELOG (cr=99 pr=0 pw=0 time=32 us)
0 HASH GROUP BY (cr=3 pr=0 pw=0 time=72 us)
0 TABLE ACCESS FULL TIBEX_AUCTIONPRICE (cr=3 pr=0 pw=0 time=30 us)
1126 HASH GROUP BY (cr=248 pr=0 pw=0 time=11102 us)
16069 TABLE ACCESS FULL TIBEX_ADMINACK (cr=248 pr=0 pw=0 time=18 us)
1126 HASH GROUP BY (cr=91 pr=0 pw=0 time=11947 us)
21235 INDEX FAST FULL SCAN INSTRUMENTSTATEMSGSEQ (cr=91 pr=0 pw=0 time=38 us)(object id 386904)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 8 0.00 0.00
direct path write temp 1260 0.52 5.39
direct path read temp 1261 0.04 2.95
SQL*Net message from client 8 0.00 0.00
SQL*Net more data to client 6 0.00 0.00
PARSE #8:c=15000,e=83259,p=0,cr=4,cu=0,mis=1,r=0,dep=0,og=1,tim=532014955506
EXEC #8:c=1000,e=170,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=532014955744
WAIT #8: nam='SQL*Net message to client' ela= 4 driver id=1413697536 #bytes=1 p3=0 obj#=572 tim=532014955794
WAIT #8: nam='direct path write temp' ela= 4090 file number=201 first dba=84873 block cnt=15 obj#=572 tim=532015639268
WAIT #8: nam='direct path write temp' ela= 2677 file number=201 first dba=84888 block cnt=15 obj#=572 tim=532015642558
WAIT #8: nam='direct path write temp' ela= 20 file number=201 first dba=84903 block cnt=15 obj#=572 tim=532015652372
WAIT #8: nam='direct path write temp' ela= 2190 file number=201 first dba=84918 block cnt=15 obj#=572 tim=532015656105
WAIT #8: nam='direct path write temp' ela= 2247 file number=201 first dba=84933 block cnt=15 obj#=572 tim=532015659146
WAIT #8: nam='direct path write temp' ela= 3386 file number=201 first dba=84948 block cnt=15 obj#=572 tim=532015662832
WAIT #8: nam='direct path write temp' ela= 3375 file number=201 first dba=84963 block cnt=15 obj#=572 tim=532015666444
WAIT #8: nam='direct path write temp' ela= 2796 file number=201 first dba=84978 block cnt=15 obj#=572 tim=532015670097
WAIT #8: nam='direct path write temp' ela= 2901 file number=201 first dba=53129 block cnt=15 obj#=572 tim=532015673308
WAIT #8: nam='direct path write temp' ela= 2933 file number=201 first dba=53144 block cnt=15 obj#=572 tim=532015676474
WAIT #8: nam='direct path write temp' ela= 15 file number=201 first dba=53159 block cnt=15 obj#=572 tim=532015686479
WAIT #8: nam='direct path write temp' ela= 2561 file number=201 first dba=53174 block cnt=15 obj#=572 tim=532015690084
WAIT #8: nam='direct path write temp' ela= 2297 file number=201 first dba=53189 block cnt=15 obj#=572 tim=532015693299
WAIT #8: nam='direct path write temp' ela= 3448 file number=201 first dba=53204 block cnt=15 obj#=572 tim=532015697026
WAIT #8: nam='direct path write temp' ela= 2633 file number=201 first dba=53219 block cnt=15 obj#=572 tim=532015700114
WAIT #8: nam='direct path write temp' ela= 2902 file number=201 first dba=53234 block cnt=15 obj#=572 tim=532015703743
WAIT #8: nam='direct path write temp' ela= 3219 file number=201 first dba=53001 block cnt=15 obj#=572 tim=532015707190
WAIT #8: nam='direct path write temp' ela= 2809 file number=201 first dba=53016 block cnt=15 obj#=572 tim=532015710215
Maybe you are looking for
-
Read in a single keyboard character
Could someone help me with the following? Read in a single keyboard character and display an appropriate message depending on whether it was a letter, a digit or some other type of character. Use a nested else-if statement. I would appreciate it, tha
-
Printer will print only partial page
I have a HP all in one printer C6250. Sometimes but not always it will print only a partial part of a page or just select information. For instance, I tried to print out a request form for an absentee ballot and it printed only the bottom part of t
-
After installing the Oracle Developer Suite 10.1.2.0.2 on my local PC I am no longer able to connect to our enterprise db using SQLPlus 10.2.0.1.0. While connecting I get the following error: ORA-12154: TNS:could not resolve the connect identifier sp
-
HT5642 my ipod is stuck in the recovery mode since 2 days and it is not restoring with itunes
my ipod is stuck in the recovery mode since 2 days and it is not restoring with itunes plzz help me friends
-
Dynamic lov, Select List in Report
Hi all, I have searched the APEX forum for dynamic lov but somehow no topic could really solve my problem. I have a report and 2 columns in this report are displayed as a select list. I want one of the select list show some values depending on the ot