Performance problem in This program
Hi friends ,
Below is the one of the perform in my program which is taking more time .. Can you please suggest me to find a solution to take less time for execution.
Thanks in Adv .
Varma ..
DATA: l_count TYPE i.
SELECT m~customer
m~name
m~payer
t~txtmd
INTO TABLE gt_cust2
FROM /bi0/pcustomer AS m
JOIN /bi0/tcustomer AS t
ON mcustomer EQ tcustomer
WHERE m~objvers EQ 'A'
AND m~accnt_grp NE space.
SORT gt_cust2 BY customer.
SELECT m~customer
m~name
m~payer
t~txtmd
INTO TABLE gt_cust
FROM /bi0/pcustomer AS m
JOIN /bi0/tcustomer AS t
ON mcustomer EQ tcustomer
WHERE m~objvers EQ 'A'
AND m~accnt_grp IN s_ktokd
AND m~payer NE space.
IF sy-subrc = 0.
SORT gt_cust BY customer.
LOOP AT gt_cust.
CLEAR l_count.
LOOP AT gt_cust2 WHERE payer = gt_cust-payer.
ADD 1 TO l_count.
IF l_count > 1.
EXIT.
ENDIF.
ENDLOOP.
gt_soldto-customer = gt_cust-customer.
gt_soldto-payer = gt_payer-payer = gt_cust-payer.
IF l_count > 1.
Payer found
CLEAR gt_cust2.
READ TABLE gt_cust2 WITH KEY customer = gt_cust-payer
BINARY SEARCH.
IF NOT gt_cust2-name IS INITIAL.
gt_payer-name = gt_cust2-name.
ELSE.
gt_payer-name = gt_cust2-txtmd.
ENDIF.
ELSE.
Stand alone customer
gt_soldto-payer = gt_payer-payer = p_nonpyr.
gt_payer-name = p_nonpnm.
ENDIF.
COLLECT: gt_soldto,
gt_payer.
ENDLOOP.
SORT: gt_soldto,
gt_payer.
ENDIF.
hi,
just remove joins and use for all entries.
if sy-subrc = 0.
use delete adjacent duplicates from itab comparing key fields.(it will increase performance)
then write another select statement.
endif.
some tips:
Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
Avoid for all entries in JOINS
Try to avoid joins and use FOR ALL ENTRIES.
Try to restrict the joins to 1 level only ie only for tables
Avoid using Select *.
Avoid having multiple Selects from the same table in the same object.
Try to minimize the number of variables to save memory.
The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
Avoid creation of index as far as possible
Avoid operators like <>, > , < & like % in where clause conditions
Avoid select/select single statements in loops.
Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
Avoid using ORDER BY in selects
Avoid Nested Selects
Avoid Nested Loops of Internal Tables
Try to use FIELD SYMBOLS.
Try to avoid into Corresponding Fields of
Avoid using Select Distinct, Use DELETE ADJACENT
Go through the following Document
Check the following Links
Re: performance tuning
Re: Performance tuning of program
http://www.sapgenie.com/abap/performance.htm
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTunin
Similar Messages
-
A problem caused this program to stop interacting with Windows
I try to run Photoshop.exe, but it doesn't respond. I get this error message. How to fix it? I have no idea where is a problem? I had no problems with it earlier.
ERROR MESSAGE:
Description:
A problem caused this program to stop interacting with Windows.
Problem signature:
Problem Event Name: AppHangB1
Application Name: Photoshop.exe
Application Version: 8.0.0.0
Application Timestamp: 3fce5708
Hang Signature: 1875
Hang Type: 0
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1063
Additional Hang Signature 1: 3732c99c21cdca196fbfee3cc7094b85
Additional Hang Signature 2: 848c
Additional Hang Signature 3: 5c7261f725b6a443e8327138a3fe0208
Additional Hang Signature 4: 1875
Additional Hang Signature 5: 3732c99c21cdca196fbfee3cc7094b85
Additional Hang Signature 6: 848c
Additional Hang Signature 7: 5c7261f725b6a443e8327138a3fe0208
Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409I suspect a RAM or hardware problem.
-
I am having this problem, in the first window when I try to do anything.
Description:
A problem caused this program to stop interacting with Windows.
Problem signature:
Problem Event Name: AppHangB1
Application Name: firefox.exe
Application Version: 1.9.2.3855
Application Timestamp: 4c48d5ce
Hang Signature: 9962
Hang Type: 0
OS Version: 6.0.6002.2.2.0.768.3
Locale ID: 1033
Additional Hang Signature 1: 5df72ce88195c0212c542e9c8c172716
Additional Hang Signature 2: 2b94
Additional Hang Signature 3: 9acafbb8ad01bf9d2eb258d8fddad3ca
Additional Hang Signature 4: 9962
Additional Hang Signature 5: 5df72ce88195c0212c542e9c8c172716
Additional Hang Signature 6: 2b94
Additional Hang Signature 7: 9acafbb8ad01bf9d2eb258d8fddad3ca
== This happened ==
Every time Firefox opened
== User Agent ==
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4I suspect a RAM or hardware problem.
-
I have received the following error message with Adobe Acrobat Pro XI when working with Portfolio Files. I am operating Windows 7 Professional.
Has anyone found a fix for this issue?
Description:
A problem caused this program to stop interacting with Windows.
Problem signature:
Problem Event Name: AppHangB1
Application Name: Acrobat.exe
Application Version: 11.0.10.32
Application Timestamp: 547e97af
Hang Signature: 8dc7
Hang Type: 0
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Hang Signature 1: 8dc7ed9d7ff41b8cc5ee35b7294b45e9
Additional Hang Signature 2: e6d0
Additional Hang Signature 3: e6d001594873a6b1363ccd82616a4edf
Additional Hang Signature 4: 8dc7
Additional Hang Signature 5: 8dc7ed9d7ff41b8cc5ee35b7294b45e9
Additional Hang Signature 6: e6d0
Additional Hang Signature 7: e6d001594873a6b1363ccd82616a4edf
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Please help
John Sorkin [email protected]jamodi
What computer operating system is your Premiere Elements 12 installed?
How far into the opening of the program do you get? Do you get to the Expert or Quick workspaces?
And, if so, how long can you stay there? What are you doing when you get this message, opening a new project
or opening an existing one that has been saved/closed or just trying to launch the program from the desktop icon.
Are you running the program Run As Administrator and from a User Account with Administrative Privileges?
Do you have the McAfee antivirus program? Do you have the latest version of QuickTime installed on your computer
with Premiere Elements 12?
What video card/graphics card does your computer use? Have you verified at the web site of the manufacturer of the
card that the video card/graphics card driver is up to date?
If you do not know, check the Device Manager/Display
Adapters to determine if you have 1 or 2 cards.
Depending on your answers, the next step will be
Uninstall the program the usual Control Panel way.
(If you can get into the program long enough to go to Help Menu/Sign Out, please do that to deactivate the program
before going to the uninstall in Control Panel area.)
Do a run through with ccleaner (both the regular cleaner and registry cleaner parts) to get rid of leftovers from
incomplete uninstalls and reinstalls.
https://www.piriform.com/ccleaner
Reinstall the program with the antivirus and firewalls disabled.
(If you have McAfee as the antivirus, that may be problem, and we can take care of that without having to go
through this uninstall/ccleaner/reinstall.)
Let us start here and then decide what next.
Thank you.
ATR -
Description:
A problem caused this program to stop interacting with Windows.
Problem signature:
Problem Event Name: AppHangB1
Application Name: firefox.exe
Application Version: 1.9.2.3951
Application Timestamp: 4cc7ae16
Hang Signature: baf1
Hang Type: 0
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 18441
Additional Hang Signature 1: 897ae6b831cea2d1f02b14199c9f3e81
Additional Hang Signature 2: 6fd0
Additional Hang Signature 3: b3b3b2452eec1eff2c85f2da7046f02c
Additional Hang Signature 4: baf1
Additional Hang Signature 5: 897ae6b831cea2d1f02b14199c9f3e81
Additional Hang Signature 6: 6fd0
Additional Hang Signature 7: b3b3b2452eec1eff2c85f2da7046f02cI suspect a RAM or hardware problem.
-
I see this board is very young. Well I'm a high school freshman in a java programming class and i have a little problem with my homework.
My source code is:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.DecimalFormat;
public class DogsHumanAge extends JApplet
implements ActionListener
JTextField inputHumanyears, displayDogyears;
public void init()
JLabel labelHumanyears = new JLabel("Enter the dog's age in human years:",
SwingConstants.RIGHT);
inputHumanyears = new JTextField(5);
JLabel labelDogyears = new JLabel("Dogyears = ", SwingConstants.RIGHT);
displayDogyears = new JTextField(5);
displayDogyears.setEditable(false);
JButton go = new JButton("Compute age");
go.addActionListener(this);
Container c = getContentPane();
c.setBackground(Color.white);
JPanel p = new JPanel();
p.setLayout(new GridLayout(3, 2, 5, 5));
p.add(labelHumanyears);
p.add(inputHumanyears);
p.add(labelDogyears);
p.add(displayDogyears);
c.add(p, BorderLayout.CENTER);
c.add(go, BorderLayout.SOUTH);
public void actionPerformed(ActionEvent e)
int Humanyears = Integer.parseInt(inputHumanyears.getText());
double Dogyears = calculateDogyears(Humanyears);
DecimalFormat df = new DecimalFormat("00.0");
displayDogyears.setText(df.format(Dogyears));
private double calculateDogyears(int Humanyears, int Dogyears)
return 13 + (int)(16.0 / 3.0 * (Dogyears - 1));
The error message i get is:
DogsHumanAge.java:42: calculateDogyears(int, int) cannot be applied to (int)
double Dogyears = calulateDogyears(Humanyears);
The intent of this program is to calculate the number of dog years from the given human years that is inputted into the input box.Ok I got the solution. A friend helped me out. I had to make a few minor changes. Now the program looks like:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.DecimalFormat;
public class DogsHumanAge extends JApplet
implements ActionListener
JTextField inputDogYears, displayHumanYears;
public void init()
JLabel labelDogYears = new JLabel("Enter the dog's age in dog years:",
SwingConstants.RIGHT);
inputDogYears = new JTextField(5);
JLabel labelHumanYears = new JLabel("Human years = ", SwingConstants.RIGHT);
displayHumanYears = new JTextField(5);
displayHumanYears.setEditable(false);
JButton go = new JButton("Compute age");
go.addActionListener(this);
Container c = getContentPane();
c.setBackground(Color.white);
JPanel p = new JPanel();
p.setLayout(new GridLayout(3, 2, 5, 5));
p.add(labelDogYears);
p.add(inputDogYears);
p.add(labelHumanYears);
p.add(displayHumanYears);
c.add(p, BorderLayout.CENTER);
c.add(go, BorderLayout.SOUTH);
public void actionPerformed(ActionEvent e)
int dogYears = Integer.parseInt(inputDogYears.getText());
double humanYears = calculateHumanYears(dogYears);
DecimalFormat df = new DecimalFormat("00.0");
displayHumanYears.setText(df.format(humanYears));
private double calculateHumanYears(int dogYears)
return 13 + (int)(16.0 / 3.0 * (dogYears - 1));
Thanks to all that helped me! -
Problems with this program...
Hello, i'm trying to write this program that will display a matrix of [] and be able to move a character around using the arrow buttons. Here is an example,
I want to be able to move the char around the world. Here is what i have done so far. I know it is sloppy but i would greatly appreciate any help.
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
import java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.event.*;
public class World1 implements KeyListener{
public static Vector rooms;
public static int location = 234;
World1(){
Vector temp = new Vector(468);
rooms = temp;
for(int i = 0; i < 468; i++){
Room tempRoom = new Room();
rooms.add(i, tempRoom);
public void keyPressed(KeyEvent event) {
int keyCode = event.getKeyCode();
if(keyCode == KeyEvent.VK_LEFT){
Room temp = new Room((char)2);
rooms.insertElementAt(temp, location-1);
Room del = new Room();
rooms.insertElementAt(del, location);
location--;
if(keyCode == KeyEvent.VK_RIGHT){
Room temp = new Room((char)2);
rooms.insertElementAt(temp, location+1);
Room del = new Room();
rooms.insertElementAt(del, location);
location++;
if(keyCode == KeyEvent.VK_UP){
Room temp = new Room((char)2);
rooms.insertElementAt(temp, location+18);
Room del = new Room();
rooms.insertElementAt(del, location);
location = location +18;
if(keyCode == KeyEvent.VK_DOWN){
Room temp = new Room((char)2);
rooms.insertElementAt(temp, location-18);
Room del = new Room();
rooms.insertElementAt(del, location);
location = location - 18;
public void keyReleased(KeyEvent event) {}
public void keyTyped(KeyEvent event) {}
public static void main(String[] args){
World1 yu = new World1();
Room smile = new Room((char)2);
rooms.insertElementAt(smile,location);
DrawFrame frame = new DrawFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
class Room{
char content;
public boolean isThisEmpty;
public boolean isEmpty(){
if(isThisEmpty == true)return true;
return false;
Room(){
isThisEmpty = true;
Room(char c){
content = c;
public String printRoom(){
if(isEmpty() == true)return " ";
return (content+"");
class DrawFrame extends JFrame
public DrawFrame(){
setTitle("Welcome to Montreax");
setSize(WIDTH, HEIGHT);
DrawPanel panel = new DrawPanel();
Container contentPane = getContentPane();
contentPane.add(panel);
public static final int WIDTH = 400;
public static final int HEIGHT = 400;
class DrawPanel extends JPanel {
public void paintComponent(Graphics g){
super.paintComponent(g);
addKeyListener(new World1());
int counter = 0;
for(int x = 1; x <=26; x++){ //-->This part is icky...i want to display the matrix
for(int i = 1; i <= 18; i++){ //but i don't know how with the frame
Room temp = (Room)rooms.get(counter);
g.drawString("[",i,x);
g.drawString(temp.printRoom(),i,x);
g.drawString("]",i,x);
if(i==18)g.drawString("",i,x);
counter++;
}I'd suggest using images. So have, say, a collection of 32x32 images, meant to be tilable, each showing a different state for that square in the map. Then display those, rather than drawing text. This seems to be the standard way of doing things like that.
Where you're currently writing "[ ]", draw a box image. Where you're currently writing "[*]", draw a box image with a glyph indicating the player (or whatever the "*" is).
BTW, you may not want to give up on ASCII art yet. Perhaps you could use a curses library for java. Or read unbuffered input and output and throw your own key events (or actually just invoke methods that key events would also call in a GUI environment). Or maybe somebody has done AWT- or Swing-for-text. Try Google. -
Performance problem in ABAP programming
Hi!
Please review the following program,
LOOP AT TG_PRICE INTO WA_PRICE.
CLEAR WA_VBELN.
READ TABLE TG_VBELN INTO WA_VBELN WITH KEY KNUMV = WA_PRICE-KNUMV
POSNR = WA_PRICE-KPOSN.
IF SY-SUBRC = 0.
WA_PRICE-VKORG = WA_VBELN-VKORG.
WA_PRICE-VBELN = WA_VBELN-VBELN.
WA_PRICE-POSNR = WA_VBELN-POSNR.
WA_PRICE-MATNR = WA_VBELN-MATNR.
WA_PRICE-MAKTX = WA_VBELN-MAKTX.
WA_PRICE-ERNAM = WA_VBELN-ERNAM.
WA_PRICE-ERDAT = WA_VBELN-ERDAT.
MODIFY TG_PRICE FROM WA_PRICE.
DELETE TABLE TG_VBELN FROM WA_VBELN.
ELSE.
DELETE TABLE TG_PRICE FROM WA_PRICE.
ENDIF.
ENDLOOP.
comments: internal table TG_PRICE has about 20,000 records and TG_VBELN has about 70,000.
this segment run spent too much time.
Comparing the following program, the speed is more faster.
LOOP AT TG_PRICE INTO WA_PRICE.
CLEAR WA_KONP.
SELECT SINGLE KNUMH
KBETR
KONWA
KPEIN
KMEIN
INTO WA_KONP
FROM KONP
WHERE KNUMH = WA_PRICE-KNUMH.
IF SY-SUBRC = 0.
WA_PRICE-KBETR_FROM = WA_KONP-KBETR_FROM.
WA_PRICE-KONWA_FROM = WA_KONP-KONWA_FROM.
WA_PRICE-KPEIN_FROM = WA_KONP-KPEIN_FROM.
WA_PRICE-KMEIN_FROM = WA_KONP-KMEIN_FROM.
VL_AMOUNT = WA_PRICE-KBETR_FROM.
CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_DISPLAY'
EXPORTING
CURRENCY = WA_PRICE-KONWA_FROM
AMOUNT_INTERNAL = VL_AMOUNT
IMPORTING
AMOUNT_DISPLAY = VL_RATE
EXCEPTIONS
INTERNAL_ERROR = 1
OTHERS = 2 .
IF SY-SUBRC = 0.
WA_PRICE-PRICE_FROM = VL_RATE.
ENDIF.
MODIFY TG_PRICE FROM WA_PRICE.
ELSE.
DELETE TABLE TG_PRICE FROM WA_PRICE.
ENDIF.
ENDLOOP.
commmets: internal table TG_PRICE has also 20,000 records. Within the Loop, there is system table selection clause. it should be slower than the previous program. But why the previous is more slower, is there something wrong with the READ clasue or any others?
Many thanks,
AriesHi Suresh,
The complete READ statment is as follows:
READ TABLE TG_VBELN INTO WA_VBELN
WITH KEY KNUMV = WA_PRICE-KNUMV
POSNR = WA_PRICE-KPOSN.
Hi Andreas,
The two internal tables have already been sorted as follows:
SORT TG_PRICE BY KNUMV KPOSN.
SORT TG_VBELN BY KNUMV POSNR.
And these two internal table are defined as follows:
Price
TYPES:BEGIN OF YS_PRICE,
KNUMV TYPE KNUMV, "Number of the document condition
KPOSN TYPE KPOSN, "Condition item number
KNUMH TYPE KNUMH, "Condition record number
VKORG TYPE VKORG, "Sales orgnazation
VBELN TYPE VBELN_VA, "Order Number
POSNR TYPE POSNR_VA, "Item number
MATNR TYPE MATNR, "Material Number
MAKTX TYPE MAKTX, "Material Description
KBETR_FROM TYPE KBETR_KOND,"Changed From Price
KONWA_FROM TYPE KONWA, "Price Unit
KPEIN_FROM TYPE KPEIN, "Per
KMEIN_FROM TYPE KMEIN, "Per
KBETR_TO TYPE KBETR_KOND,"Changed to Price
KONWA_TO TYPE KONWA, "Price Unit
KPEIN_TO TYPE KPEIN, "Per
KMEIN_TO TYPE KVMEI, "Per
ERNAM TYPE ERNAM, "Created by
ERDAT TYPE ERDAT, "Date Created
PRICE_FROM TYPE P DECIMALS 2,
PRICE_TO TYPE P DECIMALS 2,
END OF YS_PRICE.
Sales order
TYPES: BEGIN OF YS_VBELN,
KNUMV LIKE VBAK-KNUMV,"Number of the document condition
VKORG TYPE VKORG, "Sales orgnazation
VBELN TYPE VBELN_VA, "Order Number
POSNR TYPE POSNR_VA, "Item number
MATNR TYPE MATNR, "Material Number
MAKTX TYPE MAKTX, "Material Description
ERNAM TYPE ERNAM, "Created by
ERDAT TYPE ERDAT, "Date Created
END OF YS_VBELN.
DATA: TG_PRICE TYPE YS_PRICE OCCURS 0,
TG_VBELN TYPE YS_VBELN OCCURS 0.
Do you have any ideas?
Many thanks,
Aries -
Itunes wont open: has a fault :
Itunes will not interact with Windows?? problem called App Term failure ?
Anyone got an idea on how to get itunes open?
RegardsI suspect a RAM or hardware problem.
-
Anyone spot the problem with this program???
Everytime I compile part of my program it keeps on saying....
"missing return statement
^
1 error"
can anyone spot it on my program???
//GAME
public class Game2 extends MyPrint
GameInterface gameInt;
String s = "?123456789";
Player player1;
Player player2;
public Game2() // Constructor
public int makeMove()
gameInt = new GameInterface ();
player1 = new Player ();
player2 = new Player ();
myPrintln("Enter name of player");
String FP = c.input.readString();
myPrintln(FP, SYSTEM);
myPrintln("Enter name of other player");
String SP = c.input.readString();
myPrintln(SP, SYSTEM);
gameInt.pictureBoard(s);
myPrintln("");
//boolean whoWon=false;
int loop = 0;
while(loop<=6)
player1.setName(FP);
myPrintln(player1.getName() + " (X) to play");
char name1 = c.input.readChar();
name1 = c.input.readChar();
boolean playTurn = true;
gameInt.play(name1, true);
gameInt.pictureBoard(gameInt.display());
myPrintln("");
player2.setName(SP);
myPrintln(player2.getName() + " (O) to play");
char name2 = c.input.readChar();
name2 = c.input.readChar();
playTurn = false;
gameInt.play(name2, false);
gameInt.pictureBoard(gameInt.display());
myPrintln("");
loop++;
cheers
DaveChange public int makeMove() into: public void makeMove()
and the compiler will keep quiet (or finds more things to complain about) -
Performance problem in ABAP code
hai guys,
I created report using tables like bsis,t001 etc,( tax report).
I have performance problem in this report.
COuld you pls tell me how to analyse the report and find out the place where process is taking more memory etc.
i did abap trace and runtime analysis..but could not find out exact point.
how to do this..
i want to analysis each subroutine,internal table and query process.
could you pls give me some ideas.
ambichanThere is an excellent tool available in SAP - <b>Code Inspector.
</b>
Transaction is SCII
Try the following link and I am sure you will find a bunch of useful documents.
<a href="http://www.google.co.in/search?hl=en&safe=off&q=site%3Asdn.sap.comfiletype%3ApdfCode+Inspector&btnG=Search&meta=">ABAP Performance</a>
I use the Code Inspector to search for
a) All the select statements which are present within the loop
b) Nested Loops
c) Select query without providing criteria for primary keys, depending upon situation
d) Can the search be narrowed with extra conditions
e) Using READ .. BINARY SEARCH if internal table has lots of records.
The list is actually endless, but this is something to start with.
You can actually have a checklist, and depending upon it, go through your code. The more you adhere to checklist, you will find that, the performance would dramatically improve.
Also use <b>ST05</b> transaction, for SQL Trace and find out which select query is taking the maximum time for response.
Regards,
Subramanian V. -
Performance problems with SAP GUI 7.10 and BEx 3.5 Patch 400?
Hi everybody,
we installed SAP GUI 7.10 and BEx 3.5 Patch 400 and detected hugh performance problems with this version in comparison to the SAP GUI 6.40 and BEx 3.5 or BEx 7.0 Patch 800.
Does anybody detect the same problems?
Best regards,
UlliMost important question when you are talking about performance-issues:
which OC are you working on and which excel version?
ciao
Joke -
Query Performance Problem!! Oracle 25 minutes || SQLServer 3 minutes
Hi all,
I'm having a performance problem with this query bellow. It runs in 3 minutes on SQLServer and 25 minutes in Oracle.
SELECT
CASE WHEN (GROUPING(a.estado) = 1) THEN 'TOTAL'
ELSE ISNULL(a.estado, 'UNKNOWN')
END AS estado,
CASE WHEN (GROUPING(m.id_plano) = 1) THEN 'GERAL'
ELSE ISNULL(m.id_plano, 'UNKNOWN')
END AS id_plano,
sum(m.valor_2s_parcelas) valor_2s_parcelas,
convert(decimal(15,2),convert(int,sum(convert(int,(m.valor_2s_parcelas+.0000000001)*100)*
isnull(e.percentual,0.0))/100.0+.0000000001))/100 BB_Educar
FROM
movimento_dco m ,
evento_plano e,
agencia_tb a
WHERE
m.id_plano = e.id_plano
AND m.agencia *= a.prefixo
--AND m.id_plano LIKE 'pm60%'
AND m.data_pagamento >= '20070501'
AND m.data_pagamento <= '20070531'
AND m.codigo_retorno = '00'
AND m.id_parcela > 1
AND m.valor_2s_parcelas > 0.
AND e.id_evento = 'BB-Educar'
AND a.banco_id = '001'
AND a.ordem = '00'
group by m.id_plano, a.estado WITH ROLLUP
order by a.estado, m.id_plano DESC
Can anyone help me with this query?What version of Oracle, what version of SQL? Are the tables the same exact size? are they both indexed the same? Are you running on the some or similar hardware? Are the Oracle parameters similar like SGA size and PGA_AGGREGATE Target? Did you run statistics in Oracle?
Did you compare execution plans in SQL Server vs Oracle to see if SQl Servers execution plan is more superior than the one Oracle is trying to use? (most likely stale statistics).
There are many variables and we need more information than just the Query : ). -
MS SQL Server 2008 performance problem
We use TopLink 10.1.3.5 to connect to MS SQL Server 2008.
What we are seeing is that when a query is being run by TopLink a lot of cursors open up and remain open. Our database CPU usage goes up and it affects the whole application.
Our DBA took a look at it and said the database shows FETCH_APICURSOR* being used for select statements.
Is there a way to tell TopLink not to use cursors for queries?
Thanks.Can you pin point a particular TopLink query tied to the " FETCH_APICURSOR* " call in the app and post how it is being created?
My guess is that the application is specifying the TopLink query object to return a cursor or stream and not closing it in all cases, or keeping them open for a long period - did you say they were leaking, or is it just that a large number are open at a time leading to performance problems?
This streams+cursors are described in the TopLink docs here
http://docs.oracle.com/cd/E21764_01/web.1111/b32441/qryadv.htm#CJGJBHGJ
or the 10g docs here:
http://sqltech.cl/doc/oas10gR3/web.1013/b13593/qryadv010.htm
If this is the case, you might want to use a different strategy such as pagination instead of cursors, described here:
http://docs.oracle.com/cd/E17904_01/web.1111/b32441/optimiz.htm#CHDIBGFE
Best Regards,
Chris -
I running Portal version 3.0.8.9.8 on Sun Solaris and I have perfomence problem when running forms. I have created a form against emp table and it takes over one minute to open the form. When I try to run a report against the same table it only takes a second to open and execute the query.
Does anyone have solution?
nullHi all,
First, regarding 3.0.8 performance degradation, it is BUG # 1721741, the workaround:
Create 2 additional indexes:
CREATE INDEX WWA_MODULE_BINDINGS_IDX1
ON WWA_MODULE_BINDINGS$(
SUBSCRIBER_ID,
MODULE_ID,
MODULE_VERSION,
MODULE_BLOCK_ID,
MODULE_ATTR_ID)
CREATE INDEX WWA_MODULE_LOV_BINDINGS_IDX1
ON WWA_MODULE_LOV_BINDINGS$(
SUBSCRIBER_ID,
MODULE_ID,
MODULE_VERSION,
MODULE_BLOCK_ID,
MODULE_ATTR_ID)
Those indexes are missing in the standard fresh install but present if you run an upgrade from versions 3.0.6 or 3.0.7.
*****!!!!! Please note: This workaround can be applied ONLY to Portal forms version
3.0.8.9.8. Earlier versions of the Portal do not need those indexes !!!!!******
This bug is fixed in 3.0.9.
Now, 3.0.7 performance problems:
Is this normal?
No.
Is there anything that I can change to speed this up?
That's what I'm trying to figure out. Can you provide me with as much details as possible about your slow forms? Anything - form types (MD, forms on tables) any remote DB tables involved?, # of fields in the form?
Is there an index missing in the PORTAL30 schema?
No. Not in 3.0.7.
The more columns in the underlying table the longer the form takes to appear,
is this a general rule of thumb?
Yes.
Thanks,
Dmitry
Maybe you are looking for
-
How can I dynamically reference a sheet based upon the contents of a cell
I'm using Numbers to store specifications for various products. Each sheet stores specifications in a standard manner (i.e. same table and cell names) and the sheet is named according to the name of the product. On another sheet I've got a dropdown l
-
Hello All, Can you please let me know the answer to the problem that I am facing. Can we transfer the stock from one plant to another plant in one step stock transfer procedure taking the reference of STO already created ? I know that it is done in M
-
How do i deal with multiple iPhoto libraries when migrating to Photos
how do i deal with multiple iPhoto libraries when migrating to Photos
-
Xpath, jdom and whitespaces
Hello everyone, Considering i have this code working: SAXBuilder builder = new SAXBuilder(); Document doc; try { doc = builder.build(new File(file)); projectPath = XPath.newInstance("/config/project"); List projectList =
-
Seeking Director Developer in Seattle Washington.
Software Developer for a small, growing, industry-leading music education software publisher. See www.emediamusic.com for more information about us. Experience in Macromedia Director and Lingo required. Visual Basic, Perl, Access, C and Flash experie