Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Performance issue while retriving data

Reply
Thread Tools

Performance issue while retriving data

 
 
manjubala manjubala is offline
Junior Member
Join Date: May 2012
Posts: 1
 
      05-28-2012
Hi
I am new in java can anybody suggest another logic to save and retrieve data other than ArrayList as i have tried that also but it causes not an impact on as mentioned below because it causing a huge memory issue .

Vector vctSrepID = new Vector();
Vector vctSrep = new Vector();
Vector vctSrpNum = new Vector();
Vector vctEnpbuDom = new Vector();
Vector vctEnpbuExp = new Vector();
Vector vctEnpbuTot = new Vector();
Vector vctEarnAdjDom = new Vector();
Vector vctEarnAdjExp = new Vector();
Vector vctEarnAdjTot = new Vector();
Vector vctPaylessDom = new Vector();
Vector vctPaylessExp = new Vector();
Vector vctPaylessTot = new Vector();
Vector vctPWEarnAdjDom = new Vector();
Vector vctPWEarnAdjExp = new Vector();
Vector vctPWEarnAdjTot = new Vector();
Vector vctPWPaylessDom = new Vector();
Vector vctPWPaylessExp = new Vector();
Vector vctPWPaylessTot = new Vector();
Vector vctEnpauDom = new Vector();
Vector vctEnpauExp = new Vector();
Vector vctEnpauTot = new Vector();
Vector vctChkAmtDom= new Vector();
Vector vctChkAmtExp= new Vector();
Vector vctChkAmtTot= new Vector();
Vector vctPWChkAmtDom= new Vector();
Vector vctPWChkAmtExp= new Vector();
Vector vctPWChkAmtTot= new Vector();
Vector vctMemoDom = new Vector();
Vector vctMemoExp = new Vector();
Vector vctMemoTot = new Vector();



//Query Fetches Domestic, Export and Totals for Earnings and Adjustments, Payables Less and Check Amount


strSql = "SELECT query1.SALESREP_ID, query1.SALESREP_NUMBER, query1.SALESREP_NAME " +
" ,'.00' ENPBUDOM ,'.00' ENPBUEXP ,'.00' ENPBUTOT " +
" ,trim(to_char(sum(domestic_ea), 99999999999999.99)) " +
" ,trim(to_char(sum(export_ea), 99999999999999.99)) " +
" ,trim(to_char((sum(export_ea) + sum(domestic_ea)), 99999999999999.99)) " +
" ,trim(to_char(sum(domestic_cp), 99999999999999.99)) " +
" ,trim(to_char(sum(export_cp), 99999999999999.99)) " +
" ,trim(to_char((sum(export_cp) + sum(domestic_cp)), 99999999999999.99)) " +
" , '.00' ENPAUDOM ,'.00' ENPAUEXP ,'.00' ENABUTOT " +
" ,'.00' MEMODOM ,'.00' MEMOEXP ,'.00' MEMOTOT " +
" FROM( " +
" SELECT xics.salesrep_id SALESREP_ID " +
" ,xics.EMPLOYEE_NUMBER SALESREP_NUMBER " +
" ,xics.SALESREP_NAME SALESREP_NAME " +
" , decode(Export_indicator, 'YES', sum(nvl(earned_commission,0) + nvl(earned_commission_adjustment,0)), 0) EXPORT_EA " +
" , decode(Export_indicator, 'NO', sum(nvl(earned_commission,0) + nvl(earned_commission_adjustment,0)), 0) DOMESTIC_EA " +
" , decode(Export_indicator, 'YES', sum(nvl(commission_payable,0) + nvl(clawback_commission,0)), 0) EXPORT_CP " +
" , decode(Export_indicator, 'NO', sum(nvl(commission_payable,0) + nvl(clawback_commission,0)), 0) DOMESTIC_CP " +
" FROM xxcn_inv_comm_summary_v xics " +
" WHERE 1 = 1 " + strSqlParam1 +
" GROUP BY xics.salesrep_id, xics.EMPLOYEE_NUMBER ,xics.SALESREP_NAME, export_indicator " +
" ) query1 " +
" GROUP BY query1.SALESREP_ID, query1.SALESREP_NUMBER, query1.SALESREP_NAME ";


stmt = (OraclePreparedStatement) connect.prepareStatement(strSql);

rs = stmt.executeQuery(strSql);



//Populate the vectors with the fetched data
while (rs.next()) {
vctSrepID.addElement(rs.getString(1));
vctSrpNum.addElement(rs.getString(2));
vctSrep.addElement(rs.getString(3));
vctEnpbuDom.addElement(rs.getString(4));
vctEnpbuExp.addElement(rs.getString(5));
vctEnpbuTot.addElement(rs.getString(6));
vctEarnAdjDom.addElement(rs.getString(7));
vctEarnAdjExp.addElement(rs.getString();
vctEarnAdjTot.addElement(rs.getString(9));
vctPaylessDom.addElement(rs.getString(10));
vctPaylessExp.addElement(rs.getString(11));
vctPaylessTot.addElement(rs.getString(12));
vctEnpauDom.addElement(rs.getString(13));
vctEnpauExp.addElement(rs.getString(14));
vctEnpauTot.addElement(rs.getString(15));
vctMemoDom.addElement(rs.getString(16));
vctMemoExp.addElement(rs.getString(17));
vctMemoTot.addElement(rs.getString(1);




Thanks in Advance
Manju
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retriving data from some asp.net object to client side javascript Ivan S ASP .Net 4 03-10-2007 01:25 PM
Parsing through XSL and Retriving data sp XML 1 02-07-2006 01:05 PM
retriving data from memo data type of msaccess to asp.net Aneesh a ASP .Net Web Services 0 05-07-2005 01:11 AM
Retriving data simon ASP .Net 0 11-26-2003 02:15 PM
adding and retriving data from the machine.config? george d lake ASP .Net 0 08-29-2003 09:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57