How to speed up query retrieval
How can one speed up querty retrieval from database
Hi,
Add Index to Table.
Tunning of query.
Passing Optimiser Hint to query.
Bye
Chitta
Similar Messages
-
Virtual IP - how to speed up query result?
Hello,
I have a virtual IP. When I execute a report I receive after 5 minutes a result.
Following questions:
1. How can I detect the bottleneck?
2. Is there a "standard" way to improve the query runtime?
Thanks for input.
Best regards.
Pascal KernHi, STARWARS
Use tr RSRT -> Execute + Debub -> Mark "Display statistics data" -> Execute
Press F3 (back).
There you can see "Statistic Data for Query Runtime".
Analyze lines with long duration.
Hope it helps,
Alexander Kuzmich -
How to improve this query speed ?....help me
How to improve the query speed. Any hints can u suggest in the query or any correction. Here i am using sample tables for checking purpose, When i am trying with my original values, this type of query taking longer time to run
select ename,sal,comm from emp where(comm is null and &status='ok') or (comm is not null and &status='failed');
Thanx in advance
prasanth a.s.What about
select ename,sal,comm from emp where comm is null and &status='ok'
union all
select ename,sal,comm from emp where comm is not null and &status='failed';
Regards
Vaishnavi -
How to speed up this query?
I have created a demo table:
create table demo1(d date);
and insert some data to table:
begin
-- add 6000000 rows
for i in 1..1000000 loop
insert into demo1 values(trunc(sysdate-i));
insert into demo1 values(trunc(sysdate-i));
insert into demo1 values(trunc(sysdate-i));
insert into demo1 values(trunc(sysdate-i));
insert into demo1 values(trunc(sysdate-i));
insert into demo1 values(trunc(sysdate-i));
end loop;
commit;
end;
The query
select * from demo1
where d=to_date('25.10.2004','DD.MM.YYYY')
executed three times faster than
select from demo1 where d=trunc(sysdate-1);
Why? How to speed up this query if I do not want to use index?
I have created index:
create index demo1_indx on demo1(d);
Execution time of queries became identical (for this volume of data).Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table demo1(d date);
Table created.
SQL> begin
2 for i in 1..1000000 loop
3 insert into demo1 values(trunc(sysdate-i));
4 insert into demo1 values(trunc(sysdate-i));
5 insert into demo1 values(trunc(sysdate-i));
6 insert into demo1 values(trunc(sysdate-i));
7 insert into demo1 values(trunc(sysdate-i));
8 insert into demo1 values(trunc(sysdate-i));
9 insert into demo1 values(trunc(sysdate-i));
10 insert into demo1 values(trunc(sysdate-i));
11 end loop;
12 commit;
13 end;
14 /
PL/SQL procedure successfully completed.
SQL> alter session set timed_statistics=true;
Session altered.
SQL> alter session set sql_trace=true;
Session altered.
SQL> set timing on;
SQL> set autotrace on;
SQL> select * from demo1 where d='25.10.2004';
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:10.70
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3285 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3285 Card=159
Bytes=1431)
Statistics
29 recursive calls
1 db block gets
28988 consistent gets
13030 physical reads
1035300 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d='25.10.2004';
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:03.35
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3285 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3285 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12837 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d='25.10.2004';
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:04.95
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3285 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3285 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12757 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d='25.10.2004';
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:03.82
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3285 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3285 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12752 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d=trunc(sysdate-3);
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:17.53
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3696 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3696 Card=159
Bytes=1431)
Statistics
6 recursive calls
0 db block gets
14503 consistent gets
12758 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d=trunc(sysdate-3);
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:15.82
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3696 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3696 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12753 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d=trunc(sysdate-3);
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:14.56
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3696 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3696 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12758 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> select * from demo1 where d=trunc(sysdate-3);
D
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
25.10.04
8 rows selected.
Elapsed: 00:00:11.84
Execution Plan
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3696 Card=159 Byte
s=1431)
1 0 TABLE ACCESS (FULL) OF 'DEMO1' (TABLE) (Cost=3696 Card=159
Bytes=1431)
Statistics
0 recursive calls
0 db block gets
14441 consistent gets
12757 physical reads
0 redo size
453 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
8 rows processed
SQL> alter session set sql_trace=false;
Session altered.
Elapsed: 00:00:00.00
SQL> alter session set timed_statistics=false;
Session altered.
Elapsed: 00:00:00.01
SQL> -
How to speed up a query?
I want to select the MM generated documents from BKPF table where the awkey = MM Invoice no + FY and the awtyp = "RMRP". However since the BKPF table is very huge it takes a lot of time to execute.
Hence i would like to know if there is any other faster way to speed this query?Hi ,
Following points will help to improve performance.
1. Creation of secondary index with the fields you are using in select query.You need to do runtime anaysis and trace analysis to view the impact of this.
2. Try to minimize number of hits to the database table.Get the desired records from table in one go.
3. Try to minimize the records fetched from the table.You can achive this by making some fields on screen as mandatory and using them in where condition of select statement.
Hope this helps you. -
Cursor query retrieves records in anon pl/sql block but no data in store pr
Hello,
Can any one please help me,
I am using the below query, to get the table name and constraint name
select table_name,constraint_name
from all_constraints
where constraint_type in ('R','P')
and status = 'ENABLED'
and owner='IRIS_DATA'
order by constraint_type desc;
The below query retrieves data in anonymous pl/sql block and retrieve no data when i use the same cursor with the same query in procedure inside the package.
CREATE USER CLONEDEV
IDENTIFIED BY CLONE123
DEFAULT TABLESPACE IRIS
TEMPORARY TABLESPACE TEMP;
GRANT DBA TO CLONEDEV;
the user from which i am executing this query is granted dba role.
My oracle version is 10.2.0.4
Please update if you any other information.
Please advice.
Thanks>
Roles cannot be used by pl/sql.
>
NOT TRUE!
That is an oft quoted myth. There are many posts in the forum that mis-state this.
Roles can be, and are used by PL/SQL. In fact, OP stated and demonstrated that in their question: their anonymous block worked.
The Oracle docs provide a very clear explanation - the core restriction is for NAMED PL/SQL blocks that use DEFINER's rights (the default):
>
Roles Used in Named Blocks with Definer's Rights
All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.
>
The Database Security Guide has the information in the section 'How Roles Work in PL/SQL Blocks (which, of course, wouldln't be needed if they didn't work. ;) )
http://docs.oracle.com/cd/B28359_01/network.111/b28531/authorization.htm#i1007304
>
The use of roles in a PL/SQL block depends on whether it is an anonymous block or a named block (stored procedure, function, or trigger), and whether it executes with definer's rights or invoker's rights.
Roles Used in Named Blocks with Definer's Rights
All roles are disabled in any named PL/SQL block (stored procedure, function, or trigger) that executes with definer's rights. Roles are not used for privilege checking and you cannot set roles within a definer's rights procedure.
The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that executes with definer's rights queries SESSION_ROLES, then the query does not return any rows.
See Also:
Oracle Database Reference
Roles Used in Named Blocks with Invoker's Rights and Anonymous PL/SQL Blocks
Named PL/SQL blocks that execute with invoker's rights and anonymous PL/SQL blocks are executed based on privileges granted through enabled roles. Current roles are used for privilege checking within an invoker's rights PL/SQL block. You can use dynamic SQL to set a role in the session. -
My Mac has gone really slow since upgrading to Mavericks. Any suggestions as to how to speed things up again?
First, back up all data immediately unless you already have a current backup. If you can't back up, stop here. Do not take any of the steps below.
Step 1
This diagnostic procedure will query the log for messages that may indicate a system issue. It changes nothing, and therefore will not, in itself, solve your problem.
If you have more than one user account, these instructions must be carried out as an administrator.
Triple-click anywhere in the line below on this page to select it:
syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|pagin|timed? ?o' | tail | awk '/:/{$4=""; print}' | open -ef
Copy the selected text to the Clipboard by pressing the key combination command-C.
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key.
The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
A TextEdit window will open with the output of the command. Normally the command will produce no output, and the window will be empty. If the TextEdit window (not the Terminal window) has anything in it, stop here and post it — the text, please, not a screenshot. The title of the TextEdit window doesn't matter, and you don't need to post that.
Step 2
There are a few other possible causes of generalized slow performance that you can rule out easily.
Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
Reset the System Management Controller.
Run Software Update. If there's a firmware update, install it.
If you're booting from an aftermarket SSD, see whether there's a firmware update for it.
If you have a portable computer, check the cycle count of the battery. It may be due for replacement.
If you have many image or video files on the Desktop with preview icons, move them to another folder.
If applicable, uncheck all boxes in the iCloud preference pane. See whether there's any change.
Check your keychains in Keychain Access for excessively duplicated items.
Boot into Recovery mode, launch Disk Utility, and run Repair Disk.
If you have a MacBook Pro with dual graphics, disable automatic graphics switching in the Energy Saverpreference pane for better performance at the cost of shorter battery life.
Step 3
When you notice the problem, launch the Activity Monitor application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
Select the CPU tab of the Activity Monitor window.
Select All Processes from the View menu or the menu in the toolbar, if not already selected.
Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for User, System, and Idle at the bottom of the window.
Select the Memory tab. What value is shown in the bottom part of the window for Swap used?
Next, select the Disk tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in andWrites out.)
Step 4
If you have more than one user account, you must be logged in as an administrator to carry out this step.
Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
View ▹ Show Log List
from the menu bar.
Select the 50 or so most recent entries in the log. Copy them to the Clipboard by pressing the key combinationcommand-C. Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
When posting a log extract, be selective. Don't post more than is requested.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long. -
How to build this query with the minumum number of sub-selects?
The question I am trying to answer is analogous to this:
Give me all projects that: (have no employees assigned and are small) or (have only employees with the the last name = "Smith")
Thanks,
RomanThank you :
1- I am in 9.0.4.8 version and can not use allOf expression (availible in beta version)
2- I not find .notIn(subQuery) operator in 9.0.4.8 version and i replace it by .in(subQuery).not() !
My new query retrieve Customer who have 0 (zéro) Orders !
How to retrieve only customer (with orders + with orders without "television") ?
My new query is :
<div align="left" class="java">
<font color="#7f0055"><b>static </b></font><font color="#7f0055"><b>void </b></font><font color="#000000">findCustNoComputer </font><font color="#000000">(){</font>
<font color="#ffffff"> </font><font color="#000000">ClientSession cs = TopLinkSession.acquireClientSession</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">ReadAllQuery query = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReadAllQuery</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">ExpressionBuilder queryBuilder = query.getExpressionBuilder</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">ExpressionBuilder subqueryBuilder = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ExpressionBuilder</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">ReportQuery subQuery = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReportQuery</font><font color="#000000">(</font><font color="#000000">Customer.class, subqueryBuilder</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">subQuery.addAttribute</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">subQuery.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">subqueryBuilder.anyOf</font><font color="#000000">(</font><font color="#2a00ff">"Orders"</font><font color="#000000">)</font><font color="#000000">.anyOf</font><font color="#000000">(</font><font color="#2a00ff">"OrderItems"</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">"product"</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">"productName"</font><font color="#000000">)</font><font color="#000000">.equal</font><font color="#000000">(</font><font color="#2a00ff">"Computer"</font><font color="#000000">))</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">query.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">queryBuilder.get</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">)</font><font color="#000000">.in</font><font color="#000000">(</font><font color="#000000">subQuery</font><font color="#000000">)</font><font color="#000000">.not</font><font color="#000000">())</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">Vector allCustomers = </font><font color="#000000">(</font><font color="#000000">Vector</font><font color="#000000">)</font><font color="#000000">cs.executeQuery</font><font color="#000000">(</font><font color="#000000">query</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">Iterator allCustomersIterator = allCustomers.iterator</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#7f0055"><b>while </b></font><font color="#000000">(</font><font color="#000000">allCustomersIterator.hasNext</font><font color="#000000">()) </font>
<font color="#ffffff"> </font><font color="#000000">{</font>
<font color="#ffffff"> </font><font color="#000000">Customer tempCustomer = </font><font color="#000000">(</font><font color="#000000">Customer</font><font color="#000000">)</font><font color="#000000">allCustomersIterator.next</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">System.out.println</font><font color="#000000">(</font><font color="#000000">tempCustomer</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#ffffff"> </font><font color="#000000">cs.release</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#000000">}</font>
<font color="#ffffff"></font>
<font color="#ffffff"></font>
Sql of query :
SELECT
t0.CUST_LAST_NAME, t0.CUST_FIRST_NAME, t0.CREDIT_LIMIT, t0.CUST_EMAIL, t0.CUSTOMER_ID, t0.PHONE_NUMBER2, t0.PHONE_NUMBER1, t0.CUST_STREET_ADDRESS1, t0.CUST_CITY, t0.CUST_STREET_ADDRESS2, t0.CUST_STATE, t0.CUST_POSTAL_CODE
FROM TL_CUSTOMER t0
WHERE NOT (
(t0.CUSTOMER_ID IN
(SELECT DISTINCT t1.CUSTOMER_ID
FROM TL_CUSTOMER_ORDER t4, TL_ORDER_ITEM t3, TL_PRODUCT t2, TL_CUSTOMER t1
WHERE (
(t2.PRODUCT_NAME = ?) AND
((t2.PRODUCT_ID = t3.PRODUCT_ID) AND
((t3.ORDER_ID = t4.ORDER_ID) AND (t4.CUSTOMER_ID = t1.CUSTOMER_ID)))))))
Regards -
Model Aggregate tables to speed up query processing
Hi,
Can anyone help me in the topics
"Model Aggregate Tables to Speed up Query Processing"
"Model Partitions and Fragments to improve application performance and usability"
Am new to this concept, haven't worked on this before.
Regards,
ArunArun wrote:
Thanks. This would definitely help me out. But, i face issue in opening the repository in Online mode. Could you please tell me how to solve this issue?
Here OBIEE server is lying on Unix Environment.
I've created a repository in Windows Client.(Have installed OBIEE 11g developers client, BI Admin tool in my local machine).
I would like to know the way to open a repository file in online mode in Client side.
Regards,
ArunCreate a 'BI Server' type ODBC connection in your windows environment pointing to your Unix box, then when you go open -> Online in admin tool you will see the entry as an option.
Better to start a new thread when your original question is answered. -
Mac is slow. how to speed up
My Mac (1 yr old) has slowed down. How to speed it up?
First, back up all data immediately, as your boot drive might be failing.
Step 1
This diagnostic procedure will query the system log for messages that may indicate a hardware fault. It changes nothing, and therefore will not, in itself, solve your problem.
If you have more than one user account, these instructions must be carried out as an administrator. I've tested them only with the Safari web browser. If you use another browser, they may not work as described.
Triple-click anywhere in the line below on this page to select it:
syslog -k Sender kernel -k Message CReq 'Channel t|GPU D|I/O|nspace-h|n Cause: -' | tail | open -ef
Copy the selected text to the Clipboard (command-C).
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
Paste into the Terminal window (command-V).
The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
A TextEdit window will open with the output of the command. Normally the command will produce no output, and the window will be empty. If the TextEdit window (not the Terminal window) has anything in it, stop here and post it — the text, please, not a screenshot. The title of the TextEdit window doesn't matter, and you don't need to post that.
Step 2
There are a few other possible causes of generalized slow performance that you can rule out easily.
Reset the System Management Controller.
If you have many image or video files on the Desktop with preview icons, move them to another folder.
If applicable, uncheck all boxes in the iCloud preference pane.
Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
Check your keychains in Keychain Access for excessively duplicated items.
Boot into Recovery mode, launch Disk Utility, and run Repair Disk.
If you're booting from an aftermarket SSD, see whether there's a firmware update for it.
If you have a MacBook Pro with dual graphics, disable automatic graphics switching in the Energy Saverpreference pane for better performance at the cost of shorter battery life.
Step 3
When you notice the problem, launch the Activity Monitor application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Activity Monitor in the icon grid.
Select the CPU tab of the Activity Monitor window.
Select All Processes from the menu in the toolbar, if not already selected.
Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
Next, select the Disk Activity tab. Post the approximate values shown for Reads in/sec and Writes out/sec (not Reads in and Writes out.)
Step 4
If you have more than one user account, you must be logged in as an administrator to carry out this step.
Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
View ▹ Show Log List
from the menu bar.
Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
When posting a log extract, be selective. Don't post more than is requested.
Please do not indiscriminately dump thousands of lines from the log into this discussion.
Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long. -
HOW TO CHANGE SQL QUERY TO GET SPECIFIC RESULT
I HAVE FOLLOWING QUERY AND ITS FUNCTIONING BUT I WANT ALL THOSE RECORD SHOULD BE DISPLADE WICH HAVE NO TRANSACTION IN SALES ANS SALES RETURN WHILE RETREVING DATA FROM DATABASE.
I TRIED TO USE + OPERATOR BUT I DON'T KNOW HOW TO CHANGE THE QUERY TO GET THE RESULT
MAIN TABLE IS BEING USED TO FETCH RECORD
SALES_HEADER,SALES_DETAIL
SALES_HEADERR,SALES_DETAILR
STOCK_REG
AND THE QUERY IS
select s.item_code,S.DESCR,s.GRAND_TOTAL,
sum(decode(d.dayno,01,NVL(S.QTY,0),0)) DAY1,
sum(decode(d.dayno,02,NVL(S.QTY,0),0)) DAY2,
sum(decode(d.dayno,03,NVL(S.QTY,0),0)) DAY3,
sum(decode(d.dayno,04,NVL(S.QTY,0),0)) DAY4,
sum(decode(d.dayno,05,NVL(S.QTY,0),0)) DAY5,
sum(decode(d.dayno,06,NVL(S.QTY,0),0)) DAY6,
sum(decode(d.dayno,07,NVL(S.QTY,0),0)) DAY7,
sum(decode(d.dayno,08,NVL(S.QTY,0),0)) DAY8,
sum(decode(d.dayno,09,NVL(S.QTY,0),0)) DAY9,
sum(decode(d.dayno,10,NVL(S.QTY,0),0)) DAY10,
sum(decode(d.dayno,11,NVL(S.QTY,0),0)) DAY11,
sum(decode(d.dayno,12,NVL(S.QTY,0),0)) DAY12,
sum(decode(d.dayno,13,NVL(S.QTY,0),0)) DAY13,
sum(decode(d.dayno,14,NVL(S.QTY,0),0)) DAY14,
sum(decode(d.dayno,15,NVL(S.QTY,0),0)) DAY15,
sum(decode(d.dayno,16,NVL(S.QTY,0),0)) DAY16,
sum(decode(d.dayno,17,NVL(S.QTY,0),0)) DAY17,
sum(decode(d.dayno,18,NVL(S.QTY,0),0)) DAY18,
sum(decode(d.dayno,19,NVL(S.QTY,0),0)) DAY19,
sum(decode(d.dayno,20,NVL(S.QTY,0),0)) DAY20,
sum(decode(d.dayno,21,NVL(S.QTY,0),0)) DAY21,
sum(decode(d.dayno,22,NVL(S.QTY,0),0)) DAY22,
sum(decode(d.dayno,23,NVL(S.QTY,0),0)) DAY23,
sum(decode(d.dayno,24,NVL(S.QTY,0),0)) DAY24,
sum(decode(d.dayno,25,NVL(S.QTY,0),0)) DAY25,
sum(decode(d.dayno,26,NVL(S.QTY,0),0)) DAY26,
sum(decode(d.dayno,27,NVL(S.QTY,0),0)) DAY27,
sum(decode(d.dayno,28,NVL(S.QTY,0),0)) DAY28,
sum(decode(d.dayno,29,NVL(S.QTY,0),0)) DAY29,
sum(decode(d.dayno,30,NVL(S.QTY,0),0)) DAY30,
sum(decode(d.dayno,31,NVL(S.QTY,0),0)) DAY31,
sum(S.qty) TU
FROM
(select nvl(sales_detail.qty+sales_detail.bonus,0) as qty,
sales_detail.item_code AS ITEM_CODE,
stock_reg.descr AS descr,
s_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
SALES_DETAIL,SALES_HEADER,STOCK_REG
WHERE SALES_DETAIL.S_ID = SALES_HEADER.S_ID AND
SALES_DETAIL.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
STOCK_REG.COMCODE='C1'
UNION all
select -1*nvl(sales_detailR.qty+sales_detailR.bonus,0) as qty,
sales_detailR.item_code AS ITEM_CODE,
stock_reg.descr AS descr,
RETURN_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
SALES_DETAILR,SALES_HEADERR,STOCK_REG
WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
SALES_DETAILR.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
STOCK_REG.COMCODE='C1') S,
(select level as dayno
from dual
connect by level <= 31) d
where d.dayno = to_char(s.sALE_date, 'DD') AND TO_DATE(S.SALE_DATE) BETWEEN '&FROMDATE' AND '&TODATE'
GROUP BY S.ITEM_CODE,S.DESCR,S.GRAND_TOTALwell my query running successfully just the quesion was that i wanted to bring some changes in the query to retrieve the complete record which has no transaction in sales
for exmple
if i write the quey
select dept.deptno,sum(sal) from emp,dept
where dept.deptno = emp.deptno
group by dept.deptno
the recult comes as
DEPTNO SUM(SAL)
10 8750
20 10875
30 9400
though there is another deptno which is deptno no 40
have no sal
and when i use this query
select dept.deptno,sum(sal) from emp,dept
where dept.deptno = emp.deptno(+)
group by dept.deptno
it shows the dept no 40 also
DEPTNO SUM(SAL)
10 8750
20 10875
30 9400
40
so to get this i posted query which was to long to understand easily.
i accept that i sholud post short query to make other understand
so check out this
select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
FROM
SALES_DETAILR,SALES_HEADERR,STOCK_REG
WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
SALES_DETAILR.STOCKCODE = STOCK_REG.STOCKCODE
AND RETURN_DATE = '01-APR-08'
GROUP BY STOCK_rEG.item_code
ORDER BY TO_NUMBER(ITEM_CODE) ASC
when i execute this query i get the following result
ITEM_CODE QTY
84 2
102 3
108 3
116 6
166 3
170 3
thoug there is other items are aalso available in stock which transaction
yet not been done or not been sold out/
so when i use the outer join i get the same result
select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
FROM
SALES_DETAILR,SALES_HEADERR,STOCK_REG
WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
SALES_DETAILR.STOCKCODE(+) = STOCK_REG.STOCKCODE
AND RETURN_DATE = '01-APR-08'
GROUP BY STOCK_rEG.item_code
ORDER BY TO_NUMBER(ITEM_CODE) ASC
ITEM_CODE QTY
84 2
102 3
108 3
116 6
166 3
170 3
hope i tried to make u understand on better way -
How to send SQL query results to XML ?
Hey Guys, I am querying a DB with huge amount of traffic. A user select a particular lot and then details of the lot will be displayed in the following page. My concern here is that it takes really LONG to retrieve back the results coz it has to requiry in the following JSP page.
I was told to use XML to retrieve the dataset and store it. Hence, in the following query it will re-query only from the recordsets in the XML file (...Logically, should be faster rite ? ). Hence, how do parse my recordsets retrieved from the SQL query to an XML file ?
Any sort of suggestion , help, reference would be deeply appreciated ..Thanks !<HTML>
<BODY>
<H1>Manufacturing Summary beta </H1><BR>
<%@ page import="java.sql.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.text.*" %>
<jsp:include page="/index.html" flush="true"/>
<P><B>Returned result<B><BR>
<B>Query String :</B><%=request.getParameter("date") %>
<TABLE BORDER=1 cellpadding=0 cellspacing=0>
<%!
static double roundDouble(double toBeRounded, int fractionDigits)
NumberFormat format = NumberFormat.getInstance();
format.setMaximumFractionDigits(fractionDigits);
String tempDouble = format.format(toBeRounded);
return Double.parseDouble(tempDouble);
%>
<%
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@klmomnidb:1521:
OMNIDB","omni","omni");
Statement stmt = null;
ResultSet rset = null;
String S_date = new String();
String temp = new String();
String lot_id = new String();
String result = new String();
String SQL_String = new String();
double yield;
int bad_cnt;
S_date = request.getParameter("date");
lot_id = request.getParameter("lot_id");
temp = request.getParameter("TST_TEMP");
SQL_String = "SELECT LOT_ID, FLOW_ID, TST_TEMP, MODE_COD, RTST_COD, PART_CNT, GO
OD_CNT, OPER_NAM, JOB_REV, PROC_ID, START_T, FACIL_ID, TSTR_TYP, NODE_NAM FROM L
OT where START_T > TO_DATE('"+ S_date + "','MM/DD/YYYY') AND TST_TEMP <='" + tem
p+"' order by START_T";
out.println(SQL_String);
stmt = conn.createStatement();
rset = stmt.executeQuery (SQL_String);
out.println("<TR>");
out.println("<TD> Select Lot(s)</TD>");
out.println("<TD>Flow </TD>");
out.println("<TD>Temp </TD>");
out.println("<TD>Test Mode </TD>");
out.println("<TD>Retest</TD>");
out.println("<TD>Total </TD>");
out.println("<TD>Good</TD>");
out.println("<TD>Bad</TD>");
out.println("<TD>Yield </TD>");
out.println("<TD>UserID</TD>");
out.println("<TD>Program</TD>");
out.println("<TD>Mask</TD>");
out.println("<TD>Start Time </TD>");
out.println("<TD>Loc </TD>");
out.println("<TD>Tester</TD>");
out.println("<TD>System </TD>");
out.println("</TR>");
if (! rset.next()) {
result ="No records found matching seach criteria.";
while (rset.next()) {
bad_cnt = Integer.parseInt(rset.getString(6)) - Integer.parseInt(rset.getString(
7));
yield = (Double.parseDouble(rset.getString(7)) / Double.parseDouble(rset.getStri
ng(6))) * 100;
result= "<TR>";
result = result + "<TD><a href=coolpage.jsp?LOT_ID=" + rset.getString(1)+ ">" +
rset.getString(1) + "</A></TD>";
result = result + "<TD>" + rset.getString(2) + "</TD>";
result = result + "<TD>" + rset.getString(3) + "</TD>";
result = result + "<TD>" + rset.getString(4) + "</TD>";
result = result + "<TD>" + rset.getString(5) + "</TD>";
result = result + "<TD>" + rset.getString(6) + "</TD>";
result = result + "<TD>" + rset.getString(7) + "</TD>";
result = result + "<TD>" + bad_cnt + "</TD>";
result = result + "<TD>" + roundDouble(yield,2) + "% </TD>";
result = result + "<TD>" + rset.getString(8) + "</TD>";
result = result + "<TD>" + rset.getString(9) + "</TD>";
result = result + "<TD>" + rset.getString(10) + "</TD>";
result = result + "<TD>" + rset.getString(11) + "</TD>";
result = result + "<TD>" + rset.getString(12) + "</TD>";
result = result + "<TD>" + rset.getString(13) + "</TD>";
result = result + "<TD>" + rset.getString(14) + "</TD>";
result = result + "</TR>"; %>
<%=result%>
<% }
rset.close();
stmt.close();
conn.close();
%>
<%=result%>
</TABLE>
</BODY>
</HTML> -
How to create a query view in sap bw?
can any one please tell me how to create a query view in sap bw 3.5?
Hi,
you can do this by using Bex analyzer and WAD ..
gop through this link ..
http://help.sap.com/saphelp_nw70/helpdata/en/0e/1339427f82b26be10000000a155106/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
hope this helps you ..
Reagrds,
shikha -
How to get the query values from the url in a servlet and pass them to jsp
ok..this is the situation...
all applications are routed through a login page...
so if we have a url like www.abc.com/appA/login?param1=A¶m2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanksok..this is the situation...Sounds like you have a bad design on your hands.
You're going to send passwords in a GET request as clear text? Nice security there.
Why not start with basic security and work your way up?
% -
How to create a query to see Opening stock and closing stock as on particul
Hi All,
How to create a query to see Opening stock and closing stock as on particul.
Regards
AlbaikHi,
In BI 0IC_C03 will provide u the required information and also having standard queries provided by the SAP.
Plz find the list of Queries provided by the SAP.
=======================================================================================================
Inventory turnover 0IC_C01_Q0001
Range of coverage - quantity 0IC_C01_Q0002
Range of Coverage - Value 0IC_C01_Q0003
Range of coverage of finished goods - quantity 0IC_C01_Q0004
Range of Coverage of Finished Goods - Value 0IC_C01_Q0005
Range of coverage of raw materials - quantity 0IC_C01_Q0006
Range of Coverage of Raw Materials - Value 0IC_C01_Q0007
Obsolete Stock on Hand 0IC_C01_Q0008
Period-dependent requirement coverage 0IC_C01_Q0009
Value of stock on hand 0IC_C01_Q0010
Quantity of stock on hand 0IC_C01_Q0011
Material consumption 0IC_C01_Q0012
Material Movements 0IC_C01_Q0013
Consignment stock: receipts and issues 0IC_C01_Q0014
Valuated stock: receipts and issues 0IC_C01_Q0015
Material stock and movements 0IC_C01_Q0016
Material Movements (Healthcare) 0IC_C01_Q0020
Material Consumption (Healthcare) 0IC_C01_Q0021
Material Availability 0IC_C01_Q0022
Inventory Turnover Frequency (Value) 0IC_C01_Q0023
Consignment Stock Received and Issued per Unit 0IC_C01_Q0024
Material Consumption (Quantity) 0IC_C02_Q0001
Valuated Stock Receipts and Issues (Quantity) 0IC_C02_Q0002
Range of Valuated Stock (Quantity) 0IC_C02_Q0003
Inventory Turnover 0IC_C02_Q0004
Receipt and Issue Consignment Stock at Customer 0IC_C03_Q0001
Receipt and Issue Quality Inspection Stock 0IC_C03_Q0002
Vendor Consignment Stock Receipt and Issue 0IC_C03_Q0003
Receipt and Issue Stock in Transit 0IC_C03_Q0004
Receipt and Issue of Blocked Stock 0IC_C03_Q0005
Valuated Stock 0IC_C03_Q0006
Stock in Quality Inspection 0IC_C03_Q0007
Stock in Transit 0IC_C03_Q0008
Blocked Stock 0IC_C03_Q0009
Vendor Consignment Stock 0IC_C03_Q0010
Consignment Stock at Customer 0IC_C03_Q0011
Stock Overview 0IC_C03_Q0012
Stock Overview (as of 3.1 Content) 0IC_C03_Q0013
Quantities of Valuated Project Stock (as of 3.1 Content) 0IC_C03_Q0014
Valuated Stock (as of 3.1 Content) 0IC_C03_Q0015
Quantities of Valuated Sales Order Stock (as of 2.1 Cont.) 0IC_C03_Q0016
Inventory Turnover 0IC_C03_Q0017
Days' Supply 0IC_C03_Q0018
SUS: Vendor Consignment Stock 0IC_C03_Q0019
Scrap 0IC_C03_Q0020
Inventory Aging 0IC_C03_Q0021
Stock Overview - extended 0IC_C03_Q0022
Demand Supply Match 0IC_C03_Q0023
Warehouse Stock Analytics Inventory Turnover 0IC_C03_Q0024
Warehouse Analytics - Obsolescence and Variance 0IC_C03_Q0025
Stock Overview: Materials 0IC_C03_Q0030
Average Stock Value Over Time 0IC_C03_Q0031
Stock Overview Over Time 0IC_C03_Q0032
Range of Coverage Over Time 0IC_C03_Q0033
==================================================================================================
Regards
Ram.
Edited by: Ramakanth Deepak Gandepalli on Jan 18, 2010 8:06 AM
Maybe you are looking for
-
Jabber for Windows 10.5 and global redundancy
Hi All, I implement J4W 10.5 in a full redundant environment, that contains: - 3 x CUCM 10.5 - 2 x Unity Connection 10.5 - 2 x IM&P 10.5 - 2 x Expressway-C 8.2.2 - 2 x Expressway-E 8.2.2 After testing, I notice that the redundancy/failover does not a
-
Hi Just synced my itunes photos with the ATV but the photos are not as clear as they are on my Mac. Also in ATV when you preview the pictures before going into the folders the images are fine (i presume as they are smaller) but when you go into the f
-
Virgin Mac and trying to get his PC itunes onto his powerbook?
Hey everyone, I have finally become a part of the Mac world. I have a sister and two friends that have had Mac's for a couple years, and are totally obssessed with them. I finally got my first Powerbook this week. I was just curious how to transfer m
-
I am trying to print from my laptop Toshiba Model A665, to my printer, HP Deskjet 950C/952C/959C The printer and laptop are connected. The printer is going through the motions, but the paper is coming out blank. Is there a way to see if the ink cartr
-
Creating a single pdf from multiple pdfs - linking to original pdfs
I have been asked to create a PDF document from other, smaller PDFs. The individual PDFs, which I am using to create the larger PDF, are maintained on a shared network drive. I am using Acrobat Pro XI and dragging the files onto the thumbnail navigat