We have two separated enviroments with Oracle Database one with version 12.1.0.2(Server1)other 12.2.0.1(Server2). Both DBs are stored in independent machines
The issue is that, for example a query in Server1 takes 3 seconds and in Server2 it takes 6 seconds. This doesn't sound that bad but we access the DB through different services like IBM Cognos so we have to add the time that takes the service to perform its tasks to the total time it takes to execute the query.
The result is that for the same process in Server1 it takes seconds to complete it vs in Server2 it takes some minutes.
Do you have any ideas as to why could this happen?
Thanks
Related
We have two SQL Server machines in production:
SQL_Server_1
SQL_Server_2
We have a view on SQL_Server_1. If we select from that view from SQL_Server_2 SSMS, then it takes around 6 seconds to retunr. But the same view executed from SQL_Server_1 SSMS, then it is taking more than 10 minutes. View has only join of 3 tables.
Here I am not able to understand how query is taking so much of time if we execute it from same server where it is resides.
Please help me out here.
I have a single Universe query that has 4-5 filters that takes almost 5 minutes to run using the Webi rich client. When I copy the SQL code and run it from SQL management studio (SSMS) it takes 10 seconds. I have created only the data query and don't have any reports or variables. When I run the query using the Webi HTML, it also runs in 10 seconds.
Both SSMS and Webi return 110,000 rows. If I stop the Webi query after about 20 seconds, it only returned 5000 rows, so it's not finishing and then getting hung up.
If I replace the Webi Universe query with a stored procedure (FHSQL) using the same SQL code, it takes 80 seconds. There are query filters in place. Without the Where clauses, SMSS takes 65 seconds to return 990,000 rows
Filtered All_Records
# of Rows: 110,000 990,000
--------------------------------------------
SQL (SSMS): 10 sec 65 sec
Webi HTML: 10 sec
Stored Proc: 80 sec
Rich client: 270 sec
Just the rich client is slow, but much more than would be expected.
This is mostly because of non-tuned Array Fetch Size and Array Bind Size. (You can find them in the universe parameters.) The easiest way to go about would be:
Identify 2-3 reports which retrieves a considerable no of rows.
Record their execution times (probably you can use scheduling).
Increment the parameters, majorly the Array Fetch Size, by steps of 50
Check the execution times again.
Based on the performance gain/loss fine-tune the parameters.
I recently experienced this issue again after making changes to the PRM configuration files:
C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer\odbc\extensions\export
I was having date conversion errors when running my query and fixed it by setting the date format in the configuration files. The error went away, but the query started to run for 9 minutes instead of 1 minute.
I corrected the configuration file and the query would refresh in 1 minute once again.
So, incorrect changes to the PRM / date configuration files can cause Webi to do unnecessary date conversions and really slow down the query response times.
This information is in addition to the tips provided by Vimal above.
I am trying to run a simple select statement and each time I run it it takes a different amount of time to complete.
The first time takes 0 seconds, the second time it takes 3 seconds and the third time it takes 10 seconds. And if run again the query will start from 0,3,10 and keeps going on.
Why is this happening? It seems there is some kind of logic behind it.
This is causing the service that uses the database to timeout.This query is run by a specific software for thousands of times.
SQL Query:
SELECT * FROM CONTACT_CONTACT WITH (NOLOCK) WHERE MKEY ='XXXXXXXXXXXX'
I am using SQL Server 2012. The db contains 369 tables. The table CONTACT_CONTACT contains 62497 records.
I am using queries.xml file which contains 5 sql statements.
I would like to know if the 5 sql queries are executed at the same time or one sql query at a time when running the forge process?
The queries are executed one at a time as the file is processed. Also, the file is processed top down.
Is it possible to make Job Schedule, which will occur every less than 10 seconds?
Because Sql server doesn't allow that.
Schedule type is "Recurring" and Occurs "Daily".
Select occurs Daily and run every 10 seconds. Although keep in mind if your job takes longer than the time specified to run, the agent won't invoke it again until the running task completes.
See comments below. The UI tool doesn't allow input for less than 10 seconds. In your case you could schedule two job tasks offset by some number of seconds. The issue then is that the jobs could overlap as they are distinct tasks as far as SQL Agent knows.
I tried do something similar (SQL Server job with prcise timing), but the only reliabile way I found was custom windows service execution SQL statements.