A query runs in under 1 minute is sql plus, but takes 15 in Discoverer
I have a query that runs in under 1 minute is sql plus, but takes 15+mins in Discoverer. I use 3 parameters in discoverer which i specify as conditions in sql plus query. Any ideas on how to make it run faster??? BTW the query returns 10,000+ records. There is no formatting or sorting involved. Any ideas??? Seems the query execution plan is wrong...
Hi,
I agree with Michael to check your preference settings. Particulary since Plus/Viewer reads the pref.txt on the middle-tier and Desktop reads each individual PC registry.
I would start with checking Query Prediction setttings.
Try turning off Query Prediction. If it is not setup properly it can cause a delay. This is one difference between Discoverer and SQL*PLUS
See forum post:
Re: 20 mins and still predicting!!
Re: Different Performance between Desktop-Query and SQL-Plus
Hope that helps,
Steve.
Similar Messages
-
Procedure runs in SQL Plus, but not when called from my Oracle Form
Hi. I have this code to send an email alert as the user updates a record on my base table from my Oracle Form. I use dbms_scheduler so that it's submitted as a background job and so the email processing does not delay my Oracle Form from saving quickly. If I submit this code in SQL Plus it executes and I receive the email as expected.
begin
dbms_scheduler.create_job (
job_name => 'IMMEDIATE_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'begin TTMS.dropperVacationConflict_Notify (62547, ''01-SEP-11'', ''02-SEP-11''); end;',
number_of_arguments => 0,
start_date => sysdate +1/24/59, -- sysdate + 1 minute
enabled => TRUE,
auto_drop => TRUE,
comments => 'Immediate, one-time run');
end;However if I submit this code from a Post-Update trigger in my form the code runs without error, but my email is never received (the same parameter values would be passed to this trigger):
begin
-- Submit the email notification in the background so as to not slow down the screen while saving.
dbms_scheduler.create_job (
job_name => 'IMMEDIATE_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'begin TTMS.dropperVacationConflict_Notify (:dropper_vacations.dropper_id, :dropper_vacations.begin_dt, :dropper_vacations.end_dt); end;',
number_of_arguments => 0,
start_date => sysdate +1/24/59, -- sysdate + 1 minute
enabled => TRUE,
auto_drop => TRUE,
comments => 'Immediate, one-time run');
end; Any ideas why this might be happening?Wow, so I changed the two procedures so that I'm only passing in one number parameter and one char parameter...
CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) ISIf I execute it like this it works and I get the email:
TTMS.job_vacationconflict_notify(62547, 99999);or like this it works and I get the email:
TTMS.job_vacationconflict_notify(62547, '99999');But if I execute it like this (I get no errors) the email is not sent:
TTMS.job_vacationconflict_notify(62547, 'ababa');So this problem really has nothing to do with date formats. It seems to have to do with whether parameter two has characters in it!!! What the heck.
Any ideas on this?
Here is the procedure I'm calling:
CREATE OR REPLACE procedure TTMS.job_vacationconflict_notify (p_dropper_id number, p_other char) IS
begin
dbms_scheduler.create_job (
job_name => 'IMMEDIATE_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'begin TTMS.dropperVacationemailurl_new ('||p_dropper_id||','||p_other||'); end;',
number_of_arguments => 0,
start_date => sysdate +1/24/59, -- sysdate + 1 minute
enabled => TRUE,
auto_drop => TRUE,
comments => 'Immediate, one-time run');
end;
/And the above procedure is calling this procedure which should be sending the email alert:
CREATE OR REPLACE PROCEDURE TTMS.dropperVacationEmailURL_new (in_dropper_id number, in_other char) IS
myguid varchar2(15):=null;
pcm_contact varchar2(3):=null;
guid_contact varchar2(15):=null;
conflict_cnt number(8):=0;
-- Various declarations
PSENDER VARCHAR2(200); -- From
PRECIPIENT VARCHAR2(200); -- To
P_CC_RECIPIENT VARCHAR2(200); -- CC
P_BCC_RECIPIENT VARCHAR2(200); -- BCC
PSUBJECT VARCHAR2(200); -- Subject
PMESSAGE VARCHAR2(6000); -- Message Body
PPARAMETER NUMBER; -- Parameter Value
guid_valid varchar2(15); -- Used to grab the validation value of
-- Grab name details of e-mail targets
cursor targets is
select guid, initcap(first_name) first_name, initcap(first_name)||' '||initcap(last_name) fullname
from pwc_employee
where upper(guid) = upper(guid_contact);
BEGIN
select count(*)
into conflict_cnt
from dropper_bundle_assign
where
dropper_sched = in_dropper_id and
trunc(sched) <> '31-DEC-29' AND
trunc(sched) between '01-SEP-11' and '02-SEP-11' and
trunc(sched) > trunc(sysdate);
select distinct pcm
into pcm_contact
from dropper_bundle_assign
where
dropper_sched = in_dropper_id and
trunc(sched) <> '31-DEC-29' AND
trunc(sched) between '01-SEP-11' and '02-SEP-11' and
trunc(sched) > trunc(sysdate);
select guid
into guid_contact
from pwc_employee
where initials = pcm_contact;
-- Ensure required parameters have been passed
if guid_contact is not null
and in_dropper_id is not null then
Begin
select guid
into guid_valid
from pwc_employee
where upper(guid) = upper(guid_contact);
Exception
when no_data_found then
raise_application_error(-20000,'Invalid Recipient. Please check the employee table. Please try again.');
End;
-- In the event there are multiple targets then we will loop thru and send individual emails
for thisone in targets loop
PSENDER := lower(user)||'@us.ibm.com';
PRECIPIENT := lower(thisone.guid)||'@us.ibm.com';
P_CC_RECIPIENT := lower(thisone.guid)||'@us.ibm.com';
P_BCC_RECIPIENT := 'ssbuechl'||'@us.ibm.com';
PPARAMETER := TO_NUMBER(lower(in_dropper_id));
PSUBJECT := 'TEST: Dropper Vacation '||in_other||' Conflict Notification for dropper '||in_dropper_id||' - Action Required';
PMESSAGE := thisone.first_name||'-<br><br>There is an induction conflict due to a new or updated dropper vacation.<br><br>Click here to the dropper''s vacation conflicts: <u><a href="http://9.35.32.205:7777/forms/frmservlet?config=TTMSMENU&form=dropper_vacations&otherparams=p_dropper='||PPARAMETER||'">Dropper Id: '||PPARAMETER||'</a></u> (note: use your Oracle credentials when prompted for log-on information).<br><br>Thanks.';
SEND_MAIL ( PSENDER, PRECIPIENT, P_CC_RECIPIENT, P_BCC_RECIPIENT, PSUBJECT, PMESSAGE ); -- Procedure to physically send the e-mail notification
end loop;
else
raise_application_error(-20001,'Recipient and Parameter Value are required. Please try again.');
end if;
exception
when no_data_found then
raise_application_error(-20002,'Note: Email will not be sent because no PCM was identified as the manager or the PCM does not have a record in the Employee table. See ITS for assistance.');
when too_many_rows then
raise_application_error(-20003,'Note: Email will not be sent because multiple PCMs manage this dropper. Please notify each PCM manually.');
END dropperVacationEmailURL_new;
/Edited by: sharpe on Aug 17, 2011 4:38 PM
Edited by: sharpe on Aug 17, 2011 5:03 PM -
Numbering query results with a line number in SQL*Plus
Doesn't it stand to reason that in SQL*Plus there would be a way to number each query results sequentially with line numbers starting at 1 to n -- something option like from a SET command? I'm not talking about linesize.
There's a column rownum the engine adds into the result sets, just add it to the select list. Can use it to limit the result set (with some limitations) i.e.:
select rownum, ... from ... where rownum <= 100
Can't use ">=", that condition will never be met but a subset could be used:
select * from ( select rownum as linenr, tab1.* from ... ) where linenr between 10 and 20 -
After running sql scripts in SQL plus, where are the results(tables) stored
Hi ,
I am using oracleDb10g . i have used SQL plus to create a database. I have run 2 sql scripts and constructed the tables , but i dont know where the data is stored and how to make the data into a database, so that i can use it for connection through some UI.
for example: schema.sql, data.sql script files.
SQL> start schema.sql
SQL> start data.sql
The tables are created.
Now how can i group those table into a database and name it.(i mean i can create a database using SQL plus, but how to dump the tables into the database created). Because i want to use this database name for connecting to MS SQL, so i need the name.
Thanks
babu.when you are in Rome, sing with the romans !
Oracle is different from SQL Server.
Time to read some basic books.
--> http://tahiti.oracle.com -
SSRS 2008 R2 is extremely slow. The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes. I have read this is a bug in SSRS 2008 R2. We installed the most recent patches and
service packs. Nothing we've done so far has fixed it and I see that I'm not the only person with this problem. However I don't see any answers either.Hi Kim Sharp,
According to your description that when you view the report it is extremely slow in SSRS 2008 R2 but it is very fast when execute the query in dataset designer, right?
I have tested on my local environment and can‘t reproduce the issue. Obviously, it is the performance issue, rendering performance can be affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount
of data in a report, design of the report, and output format. If you have parameters in your report which contains many values in the list, the bad performance as you mentioned is an known issue on 2008 R2 and already have the hotfix:
http://support.microsoft.com/kb/2276203
Any issue after applying the update, I recommend you that submit a feedback at https://connect.microsoft.com/SQLServer/
If you don’t have, you can do some action to improve the performance when designing the report. Because how you create and update reports affects how fast the report renders.
Actually, the Report Server ExecutionLog2 view contains reports performance data. You could make use of below query to see where the report processing time is being spent:
After you determine whether the delay time is in data retrieval, report processing, or report rendering:
use ReportServer
SELECT TOP 10 ReportPath,parameters,
TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
TimeDataRetrieval, TimeProcessing, TimeRendering,
ByteCount, [RowCount],Source, AdditionalInfo
FROM ExecutionLog2
ORDER BY Timestart DESC
Use below methods to help troubleshoot issues according to the above query result :
Troubleshooting Reports: Report Performance
Besides this, you could also follow these articles for more information about this issue:
Report Server Catalog Best Practices
Performance, Snapshots, Caching (Reporting Services)
Similar thread for your reference:
SSRS slow
Any problem, please feel free to ask
Regards
Vicky Liu -
Hi.
I have problems to get my Laser Jet 5L running properly under 10.5.8. I prints the first page/document and then it says1,36 % printed than printing but nothing happens. Under 10.4.11 everything works fine, sometimes I have to get the print jobs running again,but then it works.
I have the Laser Jet 5L connected via USB to parallel.
I am running a PowerBook G4 1,67 GHz and 2 GByte RAM.
Best regards
LasertJet5LAppleHello, since nobody has piped in yet...
Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions.
Any devices that previously appeared in your Printer List and Fax List will need to be added again after resetting the printing system.
Resetting the printing system in Mac OS X 10.5.x
1. To use the Reset Printing System feature in Mac OS X 10.5.x, follow these steps:
2. Choose System Preferences from the Apple menu.
3. Choose Print & Fax from the View menu.
4. Control-click on list of printers on the left side of the window, then choose "Reset printing system" from the contextual menu. If you don't see a list of printers, Control-click on the text "Click + to add a printer or fax" and select "Reset printing system..." As an alternative, if you currently have one or more printers listed, you can Option-click the "-" (Remove printer) button.
http://support.apple.com/kb/ht1341
Reboot. -
Application running slowly under Hyper-V (factor of 100 times slower)
I have an application running in a non virtual Windows Server 2008R2/SP1 environment. It processes about 60,000 records from an indexed file (about 20MB in length) in about a second running in that environment. I want to move the application
to a Hyper-V virtual server also running Windows Server 2008R2/SP1. When I do so, the application runs, but processing the same file takes almost 2 minutes.
The application is the only thing running in the virtual machine and the virtual machine is the only VM running on the physical box. The VM is configured with a single processor, 2048M of fixed (not dynamic) memory and a fixed size disk of 255GB.
There is no network traffic so the single network connection is not used. The physical machine is a quad core with 8GB of memory and two 1TB drives that are less than 1/4 used in each case.
Now for the weird part. The application runs from the command line. If I start it and do nothing else, it takes about 2 minutes to complete its process. But, if I start the application, switch focus to another window on the virtual
machine then switch back, the process completes immediately upon switching back to the command line window.
Any thoughts?The VM is configured with a single processor - The physical machine is a quad core
Do you mean the physical machine that was running the application has a quad core processor? If not, what did the physical machine running the application actually have? Is the application multithreaded so that it can make use of multiple processors?
Did the application in the physical world have OS and data on the same disk or on different disks? Did you run this application shortly after you started the VM, or did you let the system quiesce a bit? Did you measure performance on the physical
under the same sort of conditions? Are you running from a cmd window or PowerShell? (Your comment about clicking away and coming back brings to mind things I've seen with PowerShell) Does it run quickly on a second instantiation, or does
it run poorly every instantiation?
Determining performance requires a lot more information than what you provided.
I always assign at least two virtual CPUs to any Windows Server VMs. There are enough system processes running on the box that two processors will almost always benefit the workload. Also, it it not uncommon that the first run of an application
shortly after a machine has started will never perform as it will after a machine has settled in. This is why every benchmark worth its salt will start the benchmark and let it run for a few minutes before they actually start measuring.
.:|:.:|:. tim -
Help! Problem when running CF under a non-default service account
I am running ColdFusion 9 with IIS 7 on Windows Server 2008.
The CF application service is running under a domain application account rather than the default local.
The problem is when doing so failed templates keep an active request open indefinately.
Is there a permission setting I might be missing to resolve this issue?
Thanks for any help any one can provide.Only when running CF under a domain account does the following occur:
If we have a cfm page that connects to a DB via a query tag and for some reason the query has an error,
Then it can be observed that the request to that page remains active as seen in the server monitor under statisitcs / Active Requests, it stays active and never closes although it should close. Over time such open threads add up until the Maximum number of simultaneous template requests limit is reached.
For some reason the request does not close as it should, but if we run the CF under the default system account this does not occur. I can only assume then the domain account has a permission issue. It currently does not have Full Control on the ColdFusion9 directory so I will try that next. -
Significant difference in response times for same query running on Windows client vs database server
I have a query which is taking a long time to return the results using the Oracle client.
When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
When I run the same query on a Windows client it completes in 47 minutes.
Ideally I would like to get a response time equivalent on the Windows client to what I get when running this on the database server.
In both cases the query plans are the same.
The query and plan is shown below :
{code}
SQL> explain plan
2 set statement_id = 'SLOW'
3 for
4 SELECT DISTINCT /*+ FIRST_ROWS(503) */ objecttype.id_object
5 FROM documents objecttype WHERE objecttype.id_type_definition = 'duotA9'
6 ;
Explained.
SQL> select * from table(dbms_xplan.display('PLAN_TABLE','SLOW','TYPICAL'));
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
| 0 | SELECT STATEMENT | | 2852K| 46M| | 69851 (1)|
| 1 | HASH UNIQUE | | 2852K| 46M| 153M| 69851 (1)|
|* 2 | TABLE ACCESS FULL| DOCUMENTS | 2852K| 46M| | 54063 (1)|
{code}
Are there are configuration changes that can be done on the Oracle client or database to improve the response times for the query when it is running from the client?
The version on the database server is 10.2.0.1.0
The version of the oracle client is also 10.2.0.1.0
I am happy to provide any further information if required.
Thank you in advance.I have a query which is taking a long time to return the results using the Oracle client.
When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
When I run the same query on a Windows client it completes in 47 minutes.
There are NO queries that 'run' on a client. Queries ALWAYS run within the database server.
A client can choose when to FETCH query results. In sql developer (or toad) I can choose to get 10 rows at a time. Until I choose to get the next set of 10 rows NO rows will be returned from the server to the client; That query might NEVER complete.
You may get the same results depending on the client you are using. Post your question in a forum for whatever client you are using. -
Initial execution of a workbook/query runs without ending
Hi, Experts,
I encountered a very strange behavior of Bex tool. Sometimes, Initial execution of a workbook/query runs without ending at u2018Waiting for reply from BW Serveru2019 state, then I cancel the report and run it again and it would return results within minutes. Itu2019s like it forgot to return results.
The basis team looked at the queries in the database, and said that there were actually a number of different queries being executed by my Bex query, but each individual query runs fairly quickly. The basis person pulled the statements out and ran them directly against the database and they returned result in sub seconds.
Any thoughts? Possible solution?
Thanks
ChimeiHi,
Could u let us know what is the GUI frontend patch version you are on. Also, are there any AddOn's Installed.
What version of Excel are you using. Also just for a check, run sapbexc.xla on your local machine and check the output.
Regards,
Sree. -
Hi Gurus,
We are using Report 10g on 10g Application server and solaris. we created a report on a table which has 10,000 rows. The report has 25 columns. when we run this query in Toad it took 12 sec for fetching all these 10,000 rows
But when we run the report with Destype = 'FILE' and Desformat = 'DELIMITEDDDATA', it is taking 5 to 8 minutes
to open in excel ( we concatenated mimetype=vnd-msexcel at the end of the url if the Destype=FILE). We removed the layout in the report as it is taking 10 to 15 mins to run to Screen with Desformat=HTML/PDF(formating pages taking more time). We are wondering why DELIMITEDDATA format is taking long time as it runs only query.
Does RWSERVLET take more time of writing the data to the Physical file in the cache dir? Our cache size is 1 GB. we have 2 report servers clustered. Tracing is off.
Please advise me if there are any report server settings to boost the performance.
Thanks alot,
Ram.Duplicate of Strange problem... Query runs faster, but report runs slow... in the Reports forum.
[Thread closed] -
Startup goes from 15 seconds to just under 2 minutes
Purchased a new MBP early April. It is a 2 GHz Intel Core i7 with 8GB of memory, running 10.6.7. When I got it start times were around 15-17 seconds, and after installing CS5, Microsoft W/P/E and my other small apps, it still started up in around 17 seconds, and haven't installed anything since then. Yesterday, I updated using the automatic Software Update and now it takes just under 2 minutes. I've tried repair permissions. Nothing.
Adobe and Microsoft are always going to be sort of late to the update party, you'll just have to wait.
Disconnect your router so there is no internet access what so ever, does the machine boot faster?
I'm suspecting a addition to EFI by both Microsoft and Adobe, Apple released a firmware update in the last Software Update.
EFI is a powerful firmware that can contact the internet and verify software installed on your machine before the operating system starts.
So i'm thinking the slow boot is EFI "phoning home" especially to Microsoft and Adobe who like to copy protect their wares. -
Manage query - run time errors
Hi,
we have one user working at one desktop which receives error "run-time error 5" followed by "401 Automation error" when selecting the manage query wizard proceeding from the BPC Excel action pane.
We only have this at one desktop. Any ideas?
DriesHi,
You can check the query run time by using T code RSRT.
1. Go to T code RSRT
2. Give your query name.
3. Click on the "Execute + Debug" tab
4. Various check boxed for Debug options will appear on the screen
5. Under the "Others" node you will find the check box for "Display Statics Data"
6. Check this check box and click on continue.
7. This will execute the query and provide you selection screen if any.
8. Once the query is completely executed, click on "back" button or simply hit F3.
9. This takes you to the "Statistic Data for Query Runtime screen"
10. Here you can take the total of "Duration" column to get the total duration for query execution.
Please refer following link for details:
[http://help.sap.com/saphelp_nw70/helpdata/en/43/e3807a6df402d3e10000000a1553f7/frameset.htm]
Hope this answers your query.
- Geetanjali -
VO Query runs very slow in jdev, quickly in Toad/SQL Plus
Hi,
I am trying to create a search application using JSF with ADF BC. I have a VO based on a SQL query, which joins two tables. The search criteria is referenced using bind parameters in the VO.
In Toad, SQL Plus, and SQL Developer, I can run my VO query and the results return quickly, within a couple of seconds. An Explain Plan indicates that all indexes are being correctly used. However, when I try to run my search form (exact same query) in jdev, it executes extremely slowly - almost 5 minutes before a result set is returned. My VO query is below.
select oea.order_yr,
oea.order_type,
oea.order_key,
oea.max_rev,
oeo.profit_center_id,
oeo.contract_total_price,
oeo.complexity
from oe_admin oea,
oe_order oeo
where oea.admin_id = oeo.admin_id
and oeo.profit_center_id = :ProfitCenter
and oea.order_yr = nvl(:OYear, oea.order_yr)
and oea.order_type = nvl(:OType, oea.order_type)
I've been messing with this for several days and I'm out of ideas. Does anyone have any suggestions?The question is not whether the query uses a viewLink but rather do you have any other views that are linked to this view - if you do have such views you might want to check the setting for whether children are retrieved as well.
Also run ADF BC in debug mode to see the exact query that is being sent to the server and check out the explain plan for that one. -
Query runs in TOAD but hangs in Reports
How does one begin to diagnose where a query run in Reports is hanging? The query runs in TOAD but never finishes when run within the report. Strange thing is that the query/report ran (unchanged from this month) for prior months.
Is there a "run-time visual debugger" for reports?Each query, including the 5th, runs to completion when run separately. It appears to be the addition of the 5th query which causes the problem.
NEWS FLASH: The report ran to completion over the weekend (almost totally idle server). However, it took over 90 minutes to finish.
Immediately after optimizing the queries and indicies, the report has been known to complete in 3 minutes. Over time, this has crept back up to 20 minutes.
The DBAs think a change in DBMS optimization might have caused this particular query to exceed a threshhold. They're looking at reversing this change to see the affect on the query.
Maybe you are looking for
-
My iPhone 3Gs went into Recovery Mode yesterday when I got home. When I plug it into my computer iTunes opens and gives me this message "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes."
-
Not able to start Gnome via GDM
I have just installed Archlinux on an old laptop (HP ZV5000), which I want to bring back to life as there is always a long queue to us the other PC in the family Everything went smooth, except the last step: when I try to login via GDM, the screen be
-
Hello, I have to maintain 2 platforms (BOE XI 3.1 SP2 FP2.1), there are 3 new fixpacks since the last time I connected : 2.2, 2.3 and 2.4. Do I have to install each FP or does the FP 2.4 include the previous one (2.2 and 2.3) ? Is it the same for eve
-
USB 2.0 Card Issue After Waking - Solution?
I know this issue has been discussed a number of places, and I have read a lot of the threads. I was curious though if anyone has found a solution to the issue of USB cards not working after waking from sleep. I have read that the thumb drive seems t
-
Merging Backups from a cloned machine
I had been using Time Machine to back up my MacBook Pro to an external hard drive. When I bought my iMac, which I intend to use as my main machine, I used the Time Machine backups to clone it from the MacBook, changing the name of the new machine. I