NFS write performance 6 times slower than read
Hi all,
I built my self a new homeserver and want to use NFS to export stuff to the clients. Problem is that I get a big difference in writing and reading from/to the share. Everything is connected by GBit Network, and raw network speed is fine.
Reading on the clients yields about 31MByte/s which is almost the native speed of the disks (which are luks-encrypted). But writing to the share gives only about 5.1MByte/s in the best case. Writing to the disks internally gives about 30MByte/s too. Also writing with unencrypted rsync from the client to the server gives about 25-30MByte/s, so it is definitely not a network or disk problem. So I wonder if there is anything that I could do to improve the Write-Performance of my NFS-shares. Here is my config which gives the best results so far:
Server-Side:
/etc/exports
/mnt/data 192.168.0.0/24(rw,async,no_subtree_check,crossmnt,fsid=0)
/mnt/udata 192.168.0.0/24(rw,async,no_subtree_check,crossmnt,fsid=1)
/etc/conf.d/nfs-server.conf
NFSD_OPTS=""
NFSD_COUNT="32"
PROCNFSD_MOUNTPOINT=""
PROCNFSD_MOUNTOPTS=""
MOUNTD_OPTS="--no-nfs-version 1 --no-nfs-version 2"
NEED_SVCGSSD=""
SVCGSSD_OPTS=""
Client-Side:
/etc/fstab
192.168.0.1:/mnt/data /mnt/NFS nfs rsize=32768,wsize=32768,intr,noatime 0 0
Additional Infos:
NFS to the unencrypted /mnt/udata gives about 20MByte/s reading and 10MByte/s writing.
Internal Speed of the discs is about 37-38MByte/s reading/writing for the encrypted one, and 44-45MByte/s for the unencrypted (notebook-hdd)
I Noticed that the load average on the server goes over 10 while the CPU stays at 10-20%
So if anyone has any idea what might go wrong here please let me know. If you need more information I will gladly provide it.
TIA
seiichiro0185
Last edited by seiichiro0185 (2010-02-06 13:05:23)
Your rsize and wsize looks way too big. I just use defaults and it runs fine.
I don't know what your server is but I plucked this from BSD Magazine.
There is one point worth mentioning here, modern Linux usually uses wsize and rsize 8192 by default and that can cause problems with BSD servers as many support only wsize and rsize 1024. I suggest you add the option -o wsize=1024,rsize=1024 when you mount the share on your Linux machines.
You also might want to check here for some optimisations http://www.linuxselfhelp.com/howtos/NFS … WTO-4.html
A trick to increase NFS write performance is to disable synchronous writes on the server. The NFS specification states that NFS write requests shall not be considered finished before the data written is on a non-volatile medium (normally the disk). This restricts the write performance somewhat, asynchronous writes will speed NFS writes up. The Linux nfsd has never done synchronous writes since the Linux file system implementation does not lend itself to this, but on non-Linux servers you can increase the performance this way with this in your exports file:
Last edited by sand_man (2010-03-03 00:23:23)
Similar Messages
-
Why is the download/upload speed so slow on my MBA (about 5 times slower than my PC)?
Are you on band 13 or band 4? 13 is the original LTE band and remains relatively congested. Band 4 is the XLTE band and is less congested and has higher overall potential bandwidth (15 MHz vs 10 MHz). Even so, 7 Mbps is more than enough for doing stuff on your phone and is not considered slow.
To check band,
dial *3001#12345#*
select serving cell info
frequency band will say 13 or 4
FInd an area with band 4 and retest. -
Hi.
If you try to open this HTML page in Firefox 3.6.8, Firefox is 1000 times slower than IE 8,Opera 10 and Chrome. I cannot believe that localStorage.setItem is so slow in Firefox.
Is there a solution ?
Thanks in advance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Storage test</title>
</head>
<body>
<script type="text/javascript">
var TestValue = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
for (var i = 0; i < 1000; i++) {
localStorage.setItem(i, TestValue);
</script>
</body>
</html>Hi.
If you try to open this HTML page in Firefox 3.6.8, Firefox is 1000 times slower than IE 8,Opera 10 and Chrome. I cannot believe that localStorage.setItem is so slow in Firefox.
Is there a solution ?
Thanks in advance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Storage test</title>
</head>
<body>
<script type="text/javascript">
var TestValue = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
for (var i = 0; i < 1000; i++) {
localStorage.setItem(i, TestValue);
</script>
</body>
</html> -
Why is Firefox about 5 times slower than chrome on same tablet?
Hei, I love the idea behind firefox, but as mobile browser it feels very slow.
Using the zimbra ajax email client, firefox mobile on a powerfull sony xperia tablet z takes 25s to start up, and even then, usage is laggy. Chrome on the same device starts in 5s and works smooth.
About the same results I get with http://tagesschau.de firefox mobile takes several seconds to display the page readably, while chrome gives the wanted results immediately. I even deleted all history and private stuff, and don't use any addons in firefox, as I read at your help pages, but firefox feels far behind in usability compared to chrome.
Best regards,
HeikoAre these numbers pertaining to the first request only. Actually there has been quite a lot of changes in classloader and jasper compiler etc,. in sp4. Infact sp4 is proved to be much faster than earlier versions (Though I donot have exact figures with me, sp4 is faster than sp1). But some times it also depends on the settings like the debug level, type of session(lite or distributed) etc. At this time, as you are using only the defualt set up, I suggest you to try with other samples and verify is sp4 really 7-10 times slower than sp1. And then come up to a conclusion.
After having tested with multiple samples, with the "same parameters" on both the service packs, Still if you feel sp1 is faster or any further queries please get back to the forum. Please provide information about your settings also, so that I can investigate.
Thanks,
Rakesh. -
Why does this forum perform much slower than form forum in metalink?
I feel strongly that this forum performs much slower than the form forum in metalink where there are even more active and more issues created there.
I don't know why Oracle creates two form forum, which one is faster and another one is slower.
What is the difference b/w them besides here is jsp pages and over there is plsql pages?Oracle certainly allows you to have users that do not have roles. Or users that don't have any system privileges. Or users that don't have any object privileges.
If you want the query to return a row for every row in DBA_USERS, you would need to outer join all the other tables to DBA_USERS.
Justin -
Printing from Acrobat Reader Linux is many time slower than from Windows Reader
The users are complaining to me that same file is printing one page every couple minute under Linux, while under Windows pages from the same file print one after another very quickly.
Hardware is not affecting that as they are using dual-boot Fedora 14 and XP on the same machines, printing to the same HP LaserJet printer over JetDirect.Also, I am noticing that scrolling page thumbnails and flipping pages is many times slower under Linux than under Windows on the same machine, but CPU utilization is very low.
Can one of the Linux Acrobat developers look into performance issues please? -
Windows Graphics 20 times slower than Linux Graphics?
Hello,
I am working on a java application to visualize 3D crystal structures. The atomes in the structure are drawn with "DrawOval" and "FillOval". Most of the processor time is spent on these two commands. Since I want to draw several thousands up to tens of thousands of atoms in real time, performance is a serious issue.
The program works well, however I made the following observance: The code running on Windows XP is about 20 tims slower (approx. 100 ms/frame vs. 5 ms/frame) than the same code running on the same computer under Linux!
Why is there such a big performance difference?
Is there a way to have the same performance on the windows machine as on the linux machine?
Is it necessary to use a different way to display circles?
Hardware: AMD dual Athlon, NVidia GeForce4 Ti 4400.
Thanks a lot for your help!I should say I'm surprised that there is such a big difference in performance, but if you want really great performance you might want to look into using OpenGL, even if you only do 2D graphics. 3D drivers are usually more optimized than the 2D counterparts (simply because of greater demand, unless you look into HighEnd CAD graphics cards).
Obviously OpenGL will only be faster if you've got accelerated 3D drivers for every platform. -
PreparedStatement is About 60 times slower than Statements
I am highly suprised that in my programme a normal statement is a lot faster than a Prepared Statement. I am posting below both the Programmes, in one I am using Prepared Statements and in another I am using normal Statements. My OS is Win NT My Database is SQL Server 7. THe progamme extracts data from a file and inserts records in the database. In the test case I had A file of about 1440 records ie. 1440 inserts are made to the database, The database table is very large ie. It has around 126 Columns.
So for inserting 1440 record froma file the Prepared Statements take around 7 Minutes . And for reading the same file and inserting the same no of records in the same database normal Statements Take only about 7 seconds. Now the JAcva docs clearly Specify that when we need to use the same stmt many times it is better to use Prepared Satements < the results that I am Getting is clear and complete violation of what java docs say.
Here is the code with Prepared Statements
package mps.mpsPTLF;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import gen.genCommon.genConnectionPool.*;
import gen.genCommon.*;
public class PTLFProcessor
private static clsLogFile moLogFile = new clsLogFile("");
private gen.genCommon.genConnectionPool.SharedConnectionPool mConnPool = SharedConnectionPool.getInstance(2);
FileReader fPTLF = null;
BufferedReader brPTLF = null;
//**************** Begin Constructor declaration ************************
To intialize the class variables for new Fee
public PTLFProcessor(String pathPTLF) throws GenException
try
fPTLF = new FileReader(pathPTLF);
brPTLF = new BufferedReader(fPTLF);
catch (Exception e)
throw new GenException("Error Accessing file : " + pathPTLF + " - " + e.toString(),e );
//**************** End Constructor declaration ************************
public void PTLFGetData() throws GenException
char pcData[];
int HEADERSIZE = 6;
boolean pbEndOfFile = false;
boolean pbisFirstBlock = true;
int piBlocksize = 0;
int piOffset = 0;
int piRecordsize = 0;
String psRecordContent = "";
Connection pConn = null;
try
String psInsSql=" INSERT INTO FILE_PTLF_IN ( " +
" fpi_DAT_TIM , " +
" fpi_REC_TYP , " +
" fpi_CRD_LN , " +
" fpi_CRD_FIID , " +
" fpi_CRD_NUM , " +
" fpi_MBR_NUM , " +
" fpi_MER_LN , " +
" fpi_MER_FIID , " +
" fpi_MER_GRP , " +
" fpi_MER_REGN , " +
" fpi_MER_ID , " +
" fpi_TERM_ID , " +
" fpi_SHIFT_NUM , " +
" fpi_BATCH_NUM , " +
" fpi_TERM_LN , " +
" fpi_TERM_FIID , " +
" fpi_TERM_ID_1 , " +
" fpi_TRAN , " +
" fpi_TERM_ID_2 , " +
" fpi_REC_FRMT , " +
" fpi_MER_ID_1 , " +
" fpi_CLERK_ID , " +
" fpi_DATA_FLAG , " +
" fpi_TYP , " +
" fpi_RTE_STAT , " +
" fpi_ORIGINATOR , " +
" fpi_RESPONDER , " +
" fpi_ISS_CDE , " +
" fpi_ENTRY_TIM , " +
" fpi_EXIT_TIM , " +
" fpi_RE_ENTRY_TIM , " +
" fpi_TRAN_DAT , " +
" fpi_TRAN_TIM , " +
" fpi_POST_DAT , " +
" fpi_ACQ_ICHG_SETL_DAT , " +
" fpi_ISS_ICHG_SETL_DAT , " +
" fpi_SEQ_NUM , " +
" fpi_TERM_NAME_LOC , " +
" fpi_TERM_OWNER_NAME , " +
" fpi_TERM_CITY , " +
" fpi_TERM_ST , " +
" fpi_TERM_CNTRY_CDE , " +
" fpi_BRCH_ID , " +
" fpi_USER_FLD2 , " +
" fpi_TERM_TIM_OFST , " +
" fpi_ACQ_INST_ID_NUM , " +
" fpi_RCV_INST_ID_NUM , " +
" fpi_TERM_TYP , " +
" fpi_CLERK_ID_1 , " +
" fpi_GRP , " +
" fpi_USER_ID , " +
" fpi_RETL_SIC_CDE , " +
" fpi_ORIG , " +
" fpi_DEST , " +
" fpi_TC , " +
" fpi_T , " +
" fpi_AA , " +
" fpi_C , " +
" fpi_CRD_TYP , " +
" fpi_ACCT , " +
" fpi_RESP_CDE , " +
" fpi_AMT_1 , " +
" fpi_AMT_2 , " +
" fpi_EXP_DAT , " +
" fpi_TRACK2 , " +
" fpi_PIN_OFST , " +
" fpi_PRE_AUTH_SEQ_NUM , " +
" fpi_INVOICE_NUM , " +
" fpi_ORIG_INVOICE_NUM , " +
" fpi_AUTHORIZER , " +
" fpi_AUTH_IND , " +
" fpi_SHIFT_NUM_1 , " +
" fpi_BATCH_SEQ_NUM , " +
" fpi_APPRV_CDE , " +
" fpi_APPRV_CDE_LGTH , " +
" fpi_ICHG_RESP , " +
" fpi_PSEUDO_TERM_ID , " +
" fpi_RFRL_PHONE , " +
" fpi_DFT_CAPTURE_FLG , " +
" fpi_SETL_FLAG , " +
" fpi_RVRL_CDE , " +
" fpi_REA_FOR_CHRGBCK , " +
" fpi_NUM_OF_CHRGBCK , " +
" fpi_PT_SRV_COND_CDE , " +
" fpi_PT_SRV_ENTRY_MDE , " +
" fpi_AUTH_IND2 , " +
" fpi_ORIG_CRNCY_CDE , " +
" fpi_AUTH_CRNCY_CDE , " +
" fpi_AUTH_CONV_RATE , " +
" fpi_SETL_CRNCY_CDE , " +
" fpi_SETL_CONV_RATE , " +
" fpi_CONV_DAT_TIM , " +
" fpi_IMP_IND , " +
" fpi_AVAIL_BAL , " +
" fpi_LEDG_BAL , " +
" fpi_AMT_ON_HOLD , " +
" fpi_TTL_FLOAT , " +
" fpi_CUR_FLOAT , " +
" fpi_ADJ_SETL_IMPACT_FLG , " +
" fpi_PBF1 , " +
" fpi_PBF2 , " +
" fpi_PBF3 , " +
" fpi_PBF4 , " +
" fpi_FRWD_INST_ID_NUM , " +
" fpi_CRD_ACCPT_ID_NUM , " +
" fpi_CRD_ISS_ID_NUM , " +
" fpi_ORIG_MSG_TYP , " +
" fpi_ORIG_TRAN_TIM , " +
" fpi_ORIG_TRAN_DAT , " +
" fpi_ORIG_SEQ_NUM , " +
" fpi_ORIG_B24_POST_DAT , " +
" fpi_EXCP_RSN_CDE , " +
" fpi_OVRRDE_FLG , " +
" fpi_ADDR , " +
" fpi_ZIP_CDE , " +
" fpi_ADDR_VRFY_STAT , " +
" fpi_PIN_IND , " +
" fpi_PIN_TRIES , " +
" fpi_PRE_AUTH_TS_DAT , " +
" fpi_PRE_AUTH_TS_TIM , " +
" fpi_PRE_AUTH_HLDS_LVL , " +
" fpi_USER_FLD5 , " +
" fpi_LEN , " +
" fpi_INFO )" +
" VALUES ( " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
pConn = mConnPool.getConnection();
PreparedStatement pStmt = pConn.prepareStatement(psInsSql);
while (!pbEndOfFile)
pcData = new char [HEADERSIZE]; // Reading each Block Header
brPTLF.read (pcData, 0, HEADERSIZE);
piBlocksize = Integer.parseInt (new String (pcData));
piOffset = HEADERSIZE;
while (piOffset < piBlocksize)
{ // Read the records upto end of block
pcData = new char [HEADERSIZE]; // Reading each Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE]; // Reading each Record Content
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
moLogFile.writeToLog(psRecordContent);
if (pbisFirstBlock)
if (!psRecordContent.startsWith ("TH"))
throw new GenException ("Invalid File Format, missing 'TH'");
pcData = new char [HEADERSIZE]; // Reading next Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE];// Reading next Record Content (Must be FH)
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (!psRecordContent.startsWith ("FH"))
throw new GenException ("File Header Not Found");
pbisFirstBlock = false;
else if (psRecordContent.startsWith ("DR"))
psRecordContent = psRecordContent.substring(2);
/* if (psRecordContent.length() != 1820 ) // && psRecordContent.length() != 846)
// insert in error table
continue;
if ( psRecordContent.substring(453-1, 455).equals ("000") || psRecordContent.substring(453-1, 455).equals ("001") )
pStmt.setString (1, psRecordContent.substring(1-1,19));
pStmt.setString (2, psRecordContent.substring(20-1,21));
pStmt.setString (3, psRecordContent.substring(22-1,25));
pStmt.setString (4, psRecordContent.substring(26-1,29));
pStmt.setString (5, psRecordContent.substring(30-1,48));
pStmt.setString (6, psRecordContent.substring(49-1,51));
pStmt.setString (7, psRecordContent.substring(52-1,55));
pStmt.setString (8, psRecordContent.substring(56-1,59));
pStmt.setString (9, psRecordContent.substring(60-1,63));
pStmt.setString (10, psRecordContent.substring(64-1,67));
pStmt.setString (11, psRecordContent.substring(68-1,86));
pStmt.setString (12, psRecordContent.substring(87-1,102));
pStmt.setString (13, psRecordContent.substring(103-1,105));
pStmt.setString (14, psRecordContent.substring(106-1,108));
pStmt.setString (15, psRecordContent.substring(109-1,112));
pStmt.setString (16, psRecordContent.substring(113-1,116));
pStmt.setString (17, psRecordContent.substring(117-1,132));
pStmt.setString (18, psRecordContent.substring(133-1,140));
pStmt.setString (19, psRecordContent.substring(141-1,156));
pStmt.setString (20, psRecordContent.substring(157-1,157));
pStmt.setString (21, psRecordContent.substring(158-1,176));
pStmt.setString (22, psRecordContent.substring(177-1,182));
pStmt.setString (23, psRecordContent.substring(183-1,183));
pStmt.setString (24, psRecordContent.substring(184-1,187));
pStmt.setString (25, psRecordContent.substring(188-1,189));
pStmt.setString (26, psRecordContent.substring(190-1,190));
pStmt.setString (27, psRecordContent.substring(191-1,191));
pStmt.setString (28, psRecordContent.substring(192-1,193));
pStmt.setString (29, psRecordContent.substring(194-1,212));
pStmt.setString (30, psRecordContent.substring(213-1,231));
pStmt.setString (31, psRecordContent.substring(232-1,250));
pStmt.setString (32, psRecordContent.substring(251-1,256));
pStmt.setString (33, psRecordContent.substring(257-1,264));
pStmt.setString (34, psRecordContent.substring(265-1,270));
pStmt.setString (35, psRecordContent.substring(271-1,276));
pStmt.setString (36, psRecordContent.substring(277-1,282));
pStmt.setString (37, psRecordContent.substring(283-1,294));
pStmt.setString (38, psRecordContent.substring(295-1,319));
pStmt.setString (39, psRecordContent.substring(320-1,341));
pStmt.setString (40, psRecordContent.substring(342-1,354));
pStmt.setString (41, psRecordContent.substring(355-1,357));
pStmt.setString (42, psRecordContent.substring(358-1,359));
pStmt.setString (43, psRecordContent.substring(360-1,363));
pStmt.setString (44, psRecordContent.substring(364-1,366));
pStmt.setString (45, psRecordContent.substring(367-1,371));
pStmt.setString (46, psRecordContent.substring(372-1,382));
pStmt.setString (47, psRecordContent.substring(383-1,393));
pStmt.setString (48, psRecordContent.substring(394-1,395));
pStmt.setString (49, psRecordContent.substring(396-1,401));
pStmt.setString (50, psRecordContent.substring(402-1,405));
pStmt.setString (51, psRecordContent.substring(406-1,413));
pStmt.setString (52, psRecordContent.substring(414-1,417));
pStmt.setString (53, psRecordContent.substring(418-1,421));
pStmt.setString (54, psRecordContent.substring(422-1,425));
pStmt.setString (55, psRecordContent.substring(426-1,427));
pStmt.setString (56, psRecordContent.substring(428-1,428));
pStmt.setString (57, psRecordContent.substring(429-1,430));
pStmt.setString (58, psRecordContent.substring(431-1,431));
pStmt.setString (59, psRecordContent.substring(432-1,433));
pStmt.setString (60, psRecordContent.substring(434-1,452));
pStmt.setString (61, psRecordContent.substring(453-1,455));
pStmt.setString (62, psRecordContent.substring(456-1,474));
pStmt.setString (63, psRecordContent.substring(475-1,493));
pStmt.setString (64, psRecordContent.substring(494-1,497));
pStmt.setString (65, psRecordContent.substring(498-1,537));
pStmt.setString (66, psRecordContent.substring(538-1,553));
pStmt.setString (67, psRecordContent.substring(554-1,565));
pStmt.setString (68, psRecordContent.substring(566-1,575));
pStmt.setString (69, psRecordContent.substring(576-1,585));
pStmt.setString (70, psRecordContent.substring(586-1,601));
pStmt.setString (71, psRecordContent.substring(602-1,602));
pStmt.setString (72, psRecordContent.substring(603-1,605));
pStmt.setString (73, psRecordContent.substring(606-1,608));
pStmt.setString (74, psRecordContent.substring(609-1,616));
pStmt.setString (75, psRecordContent.substring(617-1,617));
pStmt.setString (76, psRecordContent.substring(618-1,625));
pStmt.setString (77, psRecordContent.substring(626-1,629));
pStmt.setString (78, psRecordContent.substring(630-1,649));
pStmt.setString (79, psRecordContent.substring(650-1,650));
pStmt.setString (80, psRecordContent.substring(651-1,651));
pStmt.setString (81, psRecordContent.substring(652-1,653));
pStmt.setString (82, psRecordContent.substring(654-1,655));
pStmt.setString (83, psRecordContent.substring(656-1,656));
pStmt.setString (84, psRecordContent.substring(657-1,658));
pStmt.setString (85, psRecordContent.substring(659-1,661));
pStmt.setString (86, psRecordContent.substring(662-1,662));
pStmt.setString (87, psRecordContent.substring(663-1,665));
pStmt.setString (88, psRecordContent.substring(666-1,668));
pStmt.setString (89, psRecordContent.substring(669-1,676));
pStmt.setString (90, psRecordContent.substring(677-1,679));
pStmt.setString (91, psRecordContent.substring(680-1,687));
pStmt.setString (92, psRecordContent.substring(688-1,706));
pStmt.setString (93, psRecordContent.substring(707-1,707));
pStmt.setString (94, psRecordContent.substring(708-1,708));
pStmt.setString (95, psRecordContent.substring(709-1,709));
pStmt.setString (96, psRecordContent.substring(710-1,710));
pStmt.setString (97, psRecordContent.substring(711-1,711));
pStmt.setString (98, psRecordContent.substring(712-1,712));
pStmt.setString (99, psRecordContent.substring(713-1,713));
pStmt.setString (100, psRecordContent.substring(714-1,714));
pStmt.setString (101, psRecordContent.substring(715-1,715));
pStmt.setString (102, psRecordContent.substring(716-1,716));
pStmt.setString (103, psRecordContent.substring(717-1,717));
pStmt.setString (104, psRecordContent.substring(718-1,728));
pStmt.setString (105, psRecordContent.substring(729-1,739));
pStmt.setString (106, psRecordContent.substring(740-1,750));
pStmt.setString (107, psRecordContent.substring(751-1,754));
pStmt.setString (108, psRecordContent.substring(755-1,762));
pStmt.setString (109, psRecordContent.substring(763-1,766));
pStmt.setString (110, psRecordContent.substring(767-1,778));
pStmt.setString (111, psRecordContent.substring(779-1,782));
pStmt.setString (112, psRecordContent.substring(783-1,785));
pStmt.setString (113, psRecordContent.substring(786-1,786));
pStmt.setString (114, psRecordContent.substring(787-1,806));
pStmt.setString (115, psRecordContent.substring(807-1,815));
pStmt.setString (116, psRecordContent.substring(816-1,816));
pStmt.setString (117, psRecordContent.substring(817-1,817));
pStmt.setString (118, psRecordContent.substring(818-1,818));
pStmt.setString (119, psRecordContent.substring(819-1,824));
pStmt.setString (120, psRecordContent.substring(825-1,832));
pStmt.setString (121, psRecordContent.substring(833-1,833));
pStmt.setString (122, psRecordContent.substring(834-1,866));
pStmt.setString (123, psRecordContent.substring(867-1,870));
pStmt.setString (124, psRecordContent.substring(871-1,1070));
// if (pStmt.executeUpdate() != 1)
// throw new GenException ("Insertion failed");
String psMsgType = psRecordContent.substring (184-1, 187);
if (true)//updateTable (conn, pstmt, pstmt1, pstmt2, psRecordContent, out, bw))
if (psMsgType.equals ("0500") || psMsgType.equals ("0520"))
//piSettlementDR++;
if (psMsgType.equals ("0210"))
//piUpdatedDR++;
if (psMsgType.equals ("0220") || psMsgType.equals ("0320") || psMsgType.equals ("0420"))
//reversalDR++;
//validDR++;
//totalDR++;
else if (psRecordContent.startsWith ("FT"))
pcData = new char [HEADERSIZE]; // Reading next Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE];// Reading next Record Content (Must be TT)
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (!psRecordContent.startsWith ("TT"))
throw new GenException ("Total Trailer not Found.");
pbEndOfFile = true;
} // while (piOffset < piBlocksize)
} // while (!pbEndOfFile)
brPTLF.close();
fPTLF.close();
pStmt.close();
catch (Exception e)
moLogFile.printStackTrace(e);
finally
mConnPool.free(pConn);
public static void main(String args[])
try
PTLFProcessor test=new PTLFProcessor("c:\\test.txt");
test.PTLFGetData();
catch (Exception e)
clsLogFile.printStackTrace(e);
}Here is the code with Normal statements
//package mps.mpsPTLF;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import gen.genCommon.genConnectionPool.*;
import gen.genCommon.*;
public class PTLFProcessor1
private static clsLogFile moLogFile = new clsLogFile("");
private gen.genCommon.genConnectionPool.SharedConnectionPool mConnPool = SharedConnectionPool.getInstance(2);
FileReader fPTLF = null;
BufferedReader brPTLF = null;
//**************** Begin Constructor declaration ************************
To intialize the class variables for new Fee
public PTLFProcessor1(String pathPTLF) throws GenException
try
fPTLF = new FileReader(pathPTLF);
brPTLF = new BufferedReader(fPTLF);
catch (Exception e)
throw new GenException("Error Accessing file : " + pathPTLF + " - " + e.toString(),e );
//**************** End Constructor declaration ************************
public void PTLFGetData() throws GenException
char pcData[];
int HEADERSIZE = 6;
boolean pbEndOfFile = false;
boolean pbisFirstBlock = true;
int piBlocksize = 0;
int piOffset = 0;
int piRecordsize = 0;
String psRecordContent = "";
Connection pConn = null;
int cnt=0;
try
String psInsSql=" INSERT INTO FILE_PTLF_IN ( " +
" fpi_DAT_TIM , " +
" fpi_REC_TYP , " +
" fpi_CRD_LN , " +
" fpi_CRD_FIID , " +
" fpi_CRD_NUM , " +
" fpi_MBR_NUM , " +
" fpi_MER_LN , " +
" fpi_MER_FIID , " +
" fpi_MER_GRP , " +
" fpi_MER_REGN , " +
" fpi_MER_ID , " +
" fpi_TERM_ID , " +
" fpi_SHIFT_NUM , " +
" fpi_BATCH_NUM , " +
" fpi_TERM_LN , " +
" fpi_TERM_FIID , " +
" fpi_TERM_ID_1 , " +
" fpi_TRAN , " +
" fpi_TERM_ID_2 , " +
" fpi_REC_FRMT , " +
" fpi_MER_ID_1 , " +
" fpi_CLERK_ID , " +
" fpi_DATA_FLAG , " +
" fpi_TYP , " +
" fpi_RTE_STAT , " +
" fpi_ORIGINATOR , " +
" fpi_RESPONDER , " +
" fpi_ISS_CDE , " +
" fpi_ENTRY_TIM , " +
" fpi_EXIT_TIM , " +
" fpi_RE_ENTRY_TIM , " +
" fpi_TRAN_DAT , " +
" fpi_TRAN_TIM , " +
" fpi_POST_DAT , " +
" fpi_ACQ_ICHG_SETL_DAT , " +
" fpi_ISS_ICHG_SETL_DAT , " +
" fpi_SEQ_NUM , " +
" fpi_TERM_NAME_LOC , " +
" fpi_TERM_OWNER_NAME , " +
" fpi_TERM_CITY , " +
" fpi_TERM_ST , " +
" fpi_TERM_CNTRY_CDE , " +
" fpi_BRCH_ID , " +
" fpi_USER_FLD2 , " +
" fpi_TERM_TIM_OFST , " +
" fpi_ACQ_INST_ID_NUM , " +
" fpi_RCV_INST_ID_NUM , " +
" fpi_TERM_TYP , " +
" fpi_CLERK_ID_1 , " +
" fpi_GRP , " +
" fpi_USER_ID , " +
" fpi_RETL_SIC_CDE , " +
" fpi_ORIG , " +
" fpi_DEST , " +
" fpi_TC , " +
" fpi_T , " +
" fpi_AA , " +
" fpi_C , " +
" fpi_CRD_TYP , " +
" fpi_ACCT , " +
" fpi_RESP_CDE , " +
" fpi_AMT_1 , " +
" fpi_AMT_2 , " +
" fpi_EXP_DAT , " +
" fpi_TRACK2 , " +
" fpi_PIN_OFST , " +
" fpi_PRE_AUTH_SEQ_NUM , " +
" fpi_INVOICE_NUM , " +
" fpi_ORIG_INVOICE_NUM , " +
" fpi_AUTHORIZER , " +
" fpi_AUTH_IND , " +
" fpi_SHIFT_NUM_1 , " +
" fpi_BATCH_SEQ_NUM , " +
" fpi_APPRV_CDE , " +
" fpi_APPRV_CDE_LGTH , " +
" fpi_ICHG_RESP , " +
" fpi_PSEUDO_TERM_ID , " +
" fpi_RFRL_PHONE , " +
" fpi_DFT_CAPTURE_FLG , " +
" fpi_SETL_FLAG , " +
" fpi_RVRL_CDE , " +
" fpi_REA_FOR_CHRGBCK , " +
" fpi_NUM_OF_CHRGBCK , " +
" fpi_PT_SRV_COND_CDE , " +
" fpi_PT_SRV_ENTRY_MDE , " +
" fpi_AUTH_IND2 , " +
" fpi_ORIG_CRNCY_CDE , " +
" fpi_AUTH_CRNCY_CDE , " +
" fpi_AUTH_CONV_RATE , " +
" fpi_SETL_CRNCY_CDE , " +
" fpi_SETL_CONV_RATE , " +
" fpi_CONV_DAT_TIM , " +
" fpi_IMP_IND , " +
" fpi_AVAIL_BAL , " +
" fpi_LEDG_BAL , " +
" fpi_AMT_ON_HOLD , " +
" fpi_TTL_FLOAT , " +
" fpi_CUR_FLOAT , " +
" fpi_ADJ_SETL_IMPACT_FLG , " +
" fpi_PBF1 , " +
" fpi_PBF2 , " +
" fpi_PBF3 , " +
" fpi_PBF4 , " +
" fpi_FRWD_INST_ID_NUM , " +
" fpi_CRD_ACCPT_ID_NUM , " +
" fpi_CRD_ISS_ID_NUM , " +
" fpi_ORIG_MSG_TYP , " +
" fpi_ORIG_TRAN_TIM , " +
" fpi_ORIG_TRAN_DAT , " +
" fpi_ORIG_SEQ_NUM , " +
" fpi_ORIG_B24_POST_DAT , " +
" fpi_EXCP_RSN_CDE , " +
" fpi_OVRRDE_FLG , " +
" fpi_ADDR , " +
" fpi_ZIP_CDE , " +
" fpi_ADDR_VRFY_STAT , " +
" fpi_PIN_IND , " +
" fpi_PIN_TRIES , " +
" fpi_PRE_AUTH_TS_DAT , " +
" fpi_PRE_AUTH_TS_TIM , " +
" fpi_PRE_AUTH_HLDS_LVL , " +
" fpi_USER_FLD5 , " +
" fpi_LEN , " +
" fpi_INFO )" +
" VALUES ";
( " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
pConn = mConnPool.getConnection();
Statement Stmt=pConn.createStatemenDear Sir,
The problem with the prepared statement is that it gets prepared once the compilation is over and the program is running in memory, what effectively this means is that at the compilation time the process of putting togather the statement has been discounted and while compiling , only the javac or compiler is in memory while at runtime the user input is required so streams are in memory and also the JVM and obviously your code.
Anyways java is a little slower than other languages and processes your code as and when user interacts with code so it is not the fastest it you want to make it perform calculations or accept user input or as in ur case prepareStatement.
your normal SQL statement is taken care of at compile time and is therefore faster.
regards,
[email protected] -
Binding is 60 times slower than non-binding
Hi,
I have a quite serious problem using binding with Toplink. My configuration is
Toplink 9.0.4.5
Oracle 10g EE 10.2.0.4.0 (64 Bit, Partitioning, Data Mining and Real Application Testing options)
Oracle Thin JDBC Driver (either 11.2.0.1.0 or 10.2.0.4.0)
running in a Tomcat 5.5 environment.
Our usual configuration is with BindAllParameters = "true", which is fine in 99% of all cases. But in one special case, which is the search functionality of our application (insurance agents management application),
a SQL is about 60 times slower with binding, than without binding. I attach the SQL at the end of the message, but what is quite special about it is, that it uses quite a large amount of "IN" clauses. I found an earlier
posting stating, that Toplink (or Oracle JDBC) has a problem with IN-clauses and binding. Can anyone confirm this?
As I said, the SQL is part of a people search functionality, so there is a great amount of different variations. Not all variations show this behaviour, so I assume, that Oracle probably uses different execution plans regarding using prepared statments or direct execution. Can anyone confirm this also?
Lastly, is there any way to record the execution plan inside the Tomcat application?
Thanks in advance for any help, as I said before, this problem is currently very critical, since we are 2 weeks before production,
Thorsten.
Here is the example SQL (with the bind varaibles already replaced):
/* Formatted on 2010/02/08 10:27 (Formatter Plus v4.8.8) */
SELECT t0.partner_id
FROM aidatint.papartner t0
WHERE ( ( ( ( ( ( (t0.schwebe_kz = 'S')
AND (t0.aktgfid_rid = '126562119515400004')
OR ( (t0.schwebe_kz = 'O')
AND (t0.aktgfid_rid <> '126562119515400004')
AND ( (t0.gueltigbis_dt IS NULL)
OR (t0.gueltigvon_dt < t0.gueltigbis_dt)
AND (t0.mcname_txt = 'MEIER')
AND (t0.partner_id IN (
SELECT DISTINCT t1.partner_id
FROM aidatint.paadresse t1
WHERE ( ( ( ( (t1.schwebe_kz = 'S'
AND (t1.aktgfid_rid =
'126562119515400004'
OR ( (t1.schwebe_kz = 'O'
AND (t1.aktgfid_rid <>
'126562119515400004'
AND ( (t1.gueltigbis_dt IS NULL
OR (t1.gueltigvon_dt <
t1.gueltigbis_dt
AND (t1.mcort_txt = 'KOELN')
AND (t0.partner_id IN (
SELECT t2.partner_id
FROM aidatint.paparolle t2
WHERE ( ( ( ( ( (t2.schwebe_kz = 'S')
AND (t2.aktgfid_rid =
'126562119515400004'
OR ( (t2.schwebe_kz = 'O')
AND (t2.aktgfid_rid <>
'126562119515400004'
AND ( (t2.gueltigvon_dt <=
TO_DATE ('20100208',
'YYYYMMDD')
AND ( (t2.gueltigbis_dt >
TO_DATE ('20100208',
'YYYYMMDD'
OR (t2.gueltigbis_dt IS NULL)
AND (t2.geschobjtyp_typ = 'VMVT')
AND (t2.goid_id IN (
SELECT t3.vermittlervertragid_id
FROM aidatint.prvvsvermittlervertrag t3
WHERE ( ( ( (t3.schwebe_kz = 'S')
AND (t3.aktgfid_rid =
'126562119515400004'
OR ( (t3.schwebe_kz = 'O')
AND (t3.aktgfid_rid <>
'126562119515400004'
AND (t3.kumulnr_txt IN (
SELECT t4.bereichsnr_txt
FROM aidatint.prvvsstrukturangausdienst t4
WHERE ( ( ( ( (t4.schwebe_kz =
'S'
AND (t4.aktgfid_rid =
'126562119515400004'
OR ( (t4.schwebe_kz =
'O'
AND (t4.aktgfid_rid <>
'126562119515400004'
AND ( (t4.gueltigvon_dt <=
TO_DATE
('20100208',
'YYYYMMDD'
AND ( (t4.gueltigbis_dt >
TO_DATE
('20100208',
'YYYYMMDD'
OR (t4.gueltigbis_dt IS NULL
AND (t4.schluessel_txt LIKE
'##TH###1###4%'
)Odd, I would assume it is a db/JDBC issue. You can confirm this by trying the same through raw JDBC, or enabling the TopLink profiler.
It could be related to the large size of the SQL and large number of parameters to the call. You may wish to check with the JDBC group to see what the issue is.
You can disable binding for just this query, to get the binding benefit elsewhere and avoid the binding issue for just this query.
EclipseLink: http://www.eclipselink.org -
How Can I Improve Mavericks Performance (much slower than 10.8)?
When I upgraded to OS 10.9, I immediately saw a significant slower performance than with 10.8 or 10.7 (which I had been using for about two years). One big difference was a delay with the boot disc thrashing a lot when I started the computer and when I launched any app. That is, after starting my Mac Pro (2008), once the windows are all visible, there is a 30+ second delay (with the boot disc thrashing a lot) before it responds. A very similar thing happens when I launch any app. For example, when I launch iPhoto, after the photos appear, it takes 30+ seconds before it reponds to any mouse clicks. Under 10.7 and 10.8, there was about a 5 second delay (which I always thought was Faces doing its thing). This disc thrashing and delay before the app will respond happens with every app (Word, iMovie, Disc Utility, etc.) These delays never occured under 10.7 or 10.8.
A few people on the Apple Support forum suggested I run EtreCheck and remove various apps that they said could cause a problem with the OS. I removed every app they suggested, but I do not see any difference in performance. In my opinion, OS 10.9 has implemented something new that is causing my Mac Pro to run much slower.
I just ran a Safe Boot (using shift key while starting). I don't see any difference.
I would appreciate any advice.
EtreCheck Results:
Hardware Information:
Mac Pro (Early 2008)
Mac Pro - model: MacPro3,1
2 2.8 GHz Quad-Core Intel Xeon CPUs: 8 cores
8 GB RAM
Video Information:
NVIDIA GeForce 8800 GT - VRAM: 512 MB
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0
AirPlay: Version: 1.9
AppleAVBAudio: Version: 2.0.0
iSightAudio: Version: 7.7.3
System Software:
OS X 10.9 (13A603) - Uptime: 0 days 1:57:13
Disk Information:
ST3750640AS P disk0 : (750.16 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) /: 749.3 GB (299.96 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
ST31000340AS disk2 : (1 TB)
EFI (disk2s1) <not mounted>: 209.7 MB
Movies&DVDs (disk2s2) /Volumes/Movies&DVDs: 999.86 GB (140.99 GB free)
ST31000340AS disk1 : (1 TB)
EFI (disk1s1) <not mounted>: 209.7 MB
OS10.6 (disk1s2) /Volumes/OS10.6: 999.86 GB (882.64 GB free)
USB Information:
Apple, Inc. Keyboard Hub
Apple, Inc Apple Keyboard
NEC Corporation USB2.0 Hub Controller
Canon MX850 series
Apple Inc. Bluetooth USB Host Controller
FireWire Information:
Apple Computer, Inc. iSight 200mbit - 400mbit max
Thunderbolt Information:
Kernel Extensions:
Problem System Launch Daemons:
Problem System Launch Agents:
Launch Daemons:
[loaded] com.adobe.fpsaud.plist
[loaded] com.microsoft.office.licensing.helper.plist
Launch Agents:
User Launch Agents:
[loaded] com.adobe.AAM.Updater-1.0.plist
[loaded] com.adobe.ARM.[...].plist
[loaded] com.adobe.ARM.[...].plist
User Login Items:
iTunes
Mail
3rd Party Preference Panes:
Flash Player
Flip4Mac WMV
Growl
Java
Perian
Internet Plug-ins:
AdobePDFViewer.plugin
AdobePDFViewerNPAPI.plugin
Default Browser.plugin
Flash Player.plugin
FlashPlayer-10.6.plugin
Flip4Mac WMV Plugin.plugin
googletalkbrowserplugin.plugin
JavaAppletPlugin.plugin
npgtpo3dautoplugin.plugin
o1dbrowserplugin.plugin
QuickTime Plugin.plugin
RealPlayer Plugin.plugin
Silverlight.plugin
User Internet Plug-ins:
CitrixOnlineWebDeploymentPlugin.plugin
Bad Fonts:
None
Time Machine:
Skip System Files: NO
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 749.3 GB Disk used: 449.33 GB
Movies&DVDs: Disk size: 999.86 GB Disk used: 858.87 GB
Destinations:
Data [Network] (Last used)
Total size: 3 TB
Total number of backups: 79
Oldest backup: 2012-12-18 07:58:20 +0000
Last backup: 2013-11-30 01:06:05 +0000
Size of backup disk: Too small
Backup size 3 TB < (Disk used 1.31 TB X 3)
Top Processes by CPU:
13% mds
1% WindowServer
1% EtreCheck
0% ocspd
0% fontd
0% syncdefaultsd
0% aosnotifyd
Top Processes by Memory:
549 MB iTunes
385 MB mds_stores
319 MB com.apple.MediaLibraryService
139 MB com.apple.IconServicesAgent
131 MB Mail
106 MB com.apple.WebKit.WebContent
82 MB soagent
82 MB Safari
74 MB PhotoStreamAgent
74 MB WindowServer
Virtual Memory Statistics:
3.56 GB Free RAM
3.38 GB Active RAM
265 MB Inactive RAM
821 MB Wired RAM
433 MB Page-ins
0 B Page-outsFirst, 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 | 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. -
Same table, Oracle 5 times slower than MySQL
Hi
I have several sites with the same aplication using a database as a log device and to later retrieve reports from. Some tables are for setup and one are for all the log data. The log data table has the following columns: LINEID, TAG, DATE_, HOUR_, VALUE, TIME_ and CHANGED. Typical data is: 122345, PA01_FT1_ACC, 2008-08-01, 10, 985642, "", 0.
Index (TAG,DATE_)
When calling a report the software querys for typical 3-5 select querys like the following, only different TAG: SELECT * FROM table WHERE TAG='PA01_FT1_ACC' AND DATE_ BETWEEN '2008-08-01' AND '2008-08-31' AND HOUR_=24
Since our customers have different preferences some sites have Oracle and some have MySQL. And I have registered that the sites running Oracle uses 24-30 sec on the report, MySQL uses 3-6 sec on a similar report with the same tables and querying software.
How is this?
Is there anything I can do to make Oracle work faster?
Should HOUR_ also be in the index?
Since I guess this slowness is not something consistant in Oracle, there must be something to do.
Thanks for any help.Histograms on varchar2 columns are based on the
first 6 bytes of the column. If the database is using
a character set that uses 1 byte per character, every
entry in the DATE_ column since the beginning of the
year looks like '2008-0' to the optimizer when
determining cardinality to produce the "best"
execution plan. For character sets that require
multiple bytes per character, the situation is worse
- every entry in the column representing this century
appears to be the same value to the optimizer when
determining cardinality
That's a very good point and I didnt know about it
before, about first 6 bytes being used. Can you point
me in the docs where it is listed if its there or
some other document/s which has this detail?Aman,
I am having a bit of trouble finding the information in the documentation about the number of bytes used by a histogram on a VARCHAR2 column.
References:
http://www.freelists.org/archives/oracle-l/08-2006/msg00199.html
"Cost-Based Oracle Fundamentals" page 117 shows a demonstration, and describes the use of ENDPOINT_ACTUAL_VALUE starting on Oracle 9i.
"Cost-Based Oracle Fundamentals" page 118-120 describes selectivity problems when histograms are not used and a date is placed into a VARCHAR2 column.
"Troubleshooting Oracle Performance", likely around page 130-140 also indicates that histograms only use the first 6 bytes.
See section "Followup November 12, 2005 - 4pm US/Eastern"
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:707586567563
An interesting test setup that almost shows what I intended - but Oracle 10.2.0.2 was a little smarter than I expected, even though it selected to use an index to retrieve more than 50% of a table... Take a look at the TO_CHAR representation of the ENDPOINT_VALUE from DBA_TAB_HISTOGRAMS to understand what I was trying to decribe in my original post in this thread.
CREATE TABLE T1 (DATE_ VARCHAR2(10));
INSERT INTO T1
SELECT
TO_CHAR(TO_DATE('2008-01-01','YYYY-MM-DD')+ROWNUM-1,'YYYY-MM-DD')
FROM
DUAL
CONNECT BY
LEVEL<=250;
250 rows created.
COMMIT;
CREATE INDEX IND_T1 ON T1(DATE_);
SELECT
MIN(DATE_),
MAX(DATE_)
FROM
T1;
MIN(DATE_) MAX(DATE_)
2008-01-01 2008-09-06
SELECT
COLUMN_NAME,
NUM_DISTINCT,
NUM_BUCKETS,
HISTOGRAM
FROM
DBA_TAB_COL_STATISTICS
WHERE
OWNER=USER
AND TABLE_NAME='T1';
no rows selected
SELECT
SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
ENDPOINT_NUMBER,
ENDPOINT_VALUE,
SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
FROM
DBA_TAB_HISTOGRAMS
WHERE
OWNER=USER
AND TABLE_NAME='T1';
no rows selected
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',METHOD_OPT=>'FOR COLUMNS SIZE 254 DATE_',CASCADE=>TRUE);
PL/SQL procedure successfully completed.
SELECT
COLUMN_NAME,
NUM_DISTINCT,
NUM_BUCKETS,
HISTOGRAM
FROM
DBA_TAB_COL_STATISTICS
WHERE
OWNER=USER
AND TABLE_NAME='T1';
COLUMN_NAME NUM_DISTINCT NUM_BUCKETS HISTOGRAM
DATE_ 250 250 HEIGHT BALANCED
SELECT
SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
ENDPOINT_NUMBER,
ENDPOINT_VALUE,
SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
FROM
DBA_TAB_HISTOGRAMS
WHERE
OWNER=USER
AND TABLE_NAME='T1'
ORDER BY
ENDPOINT_NUMBER;
COLUMN_NAM ENDPOINT_NUMBER ENDPOINT_VALUE ENDPOINT_A
DATE_ 1 2.6059E+35 2008-01-01
DATE_ 2 2.6059E+35 2008-01-02
DATE_ 3 2.6059E+35 2008-01-03
DATE_ 4 2.6059E+35 2008-01-04
DATE_ 5 2.6059E+35 2008-01-05
DATE_ 6 2.6059E+35 2008-01-06
DATE_ 7 2.6059E+35 2008-01-07
DATE_ 8 2.6059E+35 2008-01-08
DATE_ 9 2.6059E+35 2008-01-09
DATE_ 10 2.6059E+35 2008-01-10
DATE_ 243 2.6059E+35 2008-08-30
DATE_ 244 2.6059E+35 2008-08-31
DATE_ 245 2.6059E+35 2008-09-01
DATE_ 246 2.6059E+35 2008-09-02
DATE_ 247 2.6059E+35 2008-09-03
DATE_ 248 2.6059E+35 2008-09-04
DATE_ 249 2.6059E+35 2008-09-05
DATE_ 250 2.6059E+35 2008-09-06
ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
SELECT
DATE_
FROM
T1
WHERE
DATE_<='2008-01-15';
15 rows selected.
From the 10053 trace:
BASE STATISTICAL INFORMATION
Table Stats::
Table: T1 Alias: T1
#Rows: 250 #Blks: 5 AvgRowLen: 11.00
Index Stats::
Index: IND_T1 Col#: 1
LVLS: 0 #LB: 1 #DK: 250 LB/K: 1.00 DB/K: 1.00 CLUF: 1.00
SINGLE TABLE ACCESS PATH
Column (#1): DATE_(VARCHAR2)
AvgLen: 11.00 NDV: 250 Nulls: 0 Density: 0.002
Histogram: HtBal #Bkts: 250 UncompBkts: 250 EndPtVals: 250
Table: T1 Alias: T1
Card: Original: 250 Rounded: 15 Computed: 15.00 Non Adjusted: 15.00
Access Path: TableScan
Cost: 3.01 Resp: 3.01 Degree: 0
Cost_io: 3.00 Cost_cpu: 85607
Resp_io: 3.00 Resp_cpu: 85607
Access Path: index (index (FFS))
Index: IND_T1
resc_io: 2.00 resc_cpu: 49621
ix_sel: 0.0000e+000 ix_sel_with_filters: 1
Access Path: index (FFS)
Cost: 2.00 Resp: 2.00 Degree: 1
Cost_io: 2.00 Cost_cpu: 49621
Resp_io: 2.00 Resp_cpu: 49621
Access Path: index (IndexOnly)
Index: IND_T1
resc_io: 1.00 resc_cpu: 10121
ix_sel: 0.06 ix_sel_with_filters: 0.06
Cost: 1.00 Resp: 1.00 Degree: 1
Best:: AccessPath: IndexRange Index: IND_T1
Cost: 1.00 Degree: 1 Resp: 1.00 Card: 15.00 Bytes: 0
============
Plan Table
============
| Id | Operation | Name | Rows | Bytes | Cost | Time |
| 0 | SELECT STATEMENT | | | | 1 | |
| 1 | INDEX RANGE SCAN | IND_T1 | 15 | 165 | 1 | 00:00:01 |
Predicate Information:
1 - access("DATE_"<='2008-01-15')
INSERT INTO T1
SELECT
TO_CHAR(TO_DATE('2008-09-07','YYYY-MM-DD')+ROWNUM-1,'YYYY-MM-DD')
FROM
DUAL
CONNECT BY
LEVEL<=250;
COMMIT;
EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',METHOD_OPT=>'FOR COLUMNS SIZE 254 DATE_',CASCADE=>TRUE);
PL/SQL procedure successfully completed.
SELECT
COLUMN_NAME,
NUM_DISTINCT,
NUM_BUCKETS,
HISTOGRAM
FROM
DBA_TAB_COL_STATISTICS
WHERE
OWNER=USER
AND TABLE_NAME='T1';
COLUMN_NAME NUM_DISTINCT NUM_BUCKETS HISTOGRAM
DATE_ 500 254 HEIGHT BALANCED
SELECT
SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
ENDPOINT_NUMBER,
TO_CHAR(ENDPOINT_VALUE) ENDPOINT_VALUE,
SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
FROM
DBA_TAB_HISTOGRAMS
WHERE
OWNER=USER
AND TABLE_NAME='T1'
ORDER BY
ENDPOINT_NUMBER;
COLUMN_NAM ENDPOINT_NUMBER ENDPOINT_VALUE ENDPOINT_A
DATE_ 0 260592218925307000000000000000000000 2008-01-01
DATE_ 1 260592218925307000000000000000000000 2008-01-02
DATE_ 2 260592218925307000000000000000000000 2008-01-04
DATE_ 3 260592218925307000000000000000000000 2008-01-06
DATE_ 4 260592218925307000000000000000000000 2008-01-08
DATE_ 5 260592218925307000000000000000000000 2008-01-10
DATE_ 6 260592218925307000000000000000000000 2008-01-12
DATE_ 7 260592218925307000000000000000000000 2008-01-14
DATE_ 8 260592218925307000000000000000000000 2008-01-16
DATE_ 9 260592218925307000000000000000000000 2008-01-18
DATE_ 10 260592218925307000000000000000000000 2008-01-20
DATE_ 242 260592219234792000000000000000000000 2009-04-26
DATE_ 243 260592219234792000000000000000000000 2009-04-28
DATE_ 244 260592219234792000000000000000000000 2009-04-29
DATE_ 245 260592219234792000000000000000000000 2009-05-01
DATE_ 246 260592219234792000000000000000000000 2009-05-02
DATE_ 247 260592219234792000000000000000000000 2009-05-04
DATE_ 248 260592219234792000000000000000000000 2009-05-05
DATE_ 249 260592219234792000000000000000000000 2009-05-07
DATE_ 250 260592219234792000000000000000000000 2009-05-08
DATE_ 251 260592219234792000000000000000000000 2009-05-10
DATE_ 252 260592219234792000000000000000000000 2009-05-11
DATE_ 253 260592219234792000000000000000000000 2009-05-13
DATE_ 254 260592219234792000000000000000000000 2009-05-14
SELECT
DATE_
FROM
T1
WHERE
DATE_ BETWEEN '2008-01-15' AND '2008-09-15';
245 rows selected.
From the 10053 trace:
BASE STATISTICAL INFORMATION
Table Stats::
Table: T1 Alias: T1
#Rows: 500 #Blks: 5 AvgRowLen: 11.00
Index Stats::
Index: IND_T1 Col#: 1
LVLS: 1 #LB: 2 #DK: 500 LB/K: 1.00 DB/K: 1.00 CLUF: 2.00
SINGLE TABLE ACCESS PATH
Column (#1): DATE_(VARCHAR2)
AvgLen: 11.00 NDV: 500 Nulls: 0 Density: 0.002
Histogram: HtBal #Bkts: 254 UncompBkts: 254 EndPtVals: 255
Table: T1 Alias: T1
Card: Original: 500 Rounded: 240 Computed: 240.16 Non Adjusted: 240.16
Access Path: TableScan
Cost: 3.01 Resp: 3.01 Degree: 0
Cost_io: 3.00 Cost_cpu: 148353
Resp_io: 3.00 Resp_cpu: 148353
Access Path: index (index (FFS))
Index: IND_T1
resc_io: 2.00 resc_cpu: 111989
ix_sel: 0.0000e+000 ix_sel_with_filters: 1
Access Path: index (FFS)
Cost: 2.01 Resp: 2.01 Degree: 1
Cost_io: 2.00 Cost_cpu: 111989
Resp_io: 2.00 Resp_cpu: 111989
Access Path: index (IndexOnly)
Index: IND_T1
resc_io: 2.00 resc_cpu: 62443
ix_sel: 0.48031 ix_sel_with_filters: 0.48031
Cost: 2.00 Resp: 2.00 Degree: 1
Best:: AccessPath: IndexRange Index: IND_T1
Cost: 2.00 Degree: 1 Resp: 2.00 Card: 240.16 Bytes: 0
============
Plan Table
============
| Id | Operation | Name | Rows | Bytes | Cost | Time |
| 0 | SELECT STATEMENT | | | | 2 | |
| 1 | INDEX RANGE SCAN | IND_T1 | 240 | 2640 | 2 | 00:00:01 |
Predicate Information:
1 - access("DATE_">='2008-01-15' AND "DATE_"<='2008-09-15')I am sure that there are much better examples than the above, as the above generates a very small data set, and is still an incomplete test setup.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
When received messages include embedded pictures, Outlook 2010 does not persist those pictures in the .pst file with the message text. Instead, it redownloads the pictures every time the message is rendered for viewing or printing.
Send/Receive to replicate a message with multiple embedded pictures from POP3 mail server (not Exchange server)
Select and view the message - notice all the x placeholders for the embedded pictures
Right-click any x placeholder and select to "download pictures"
After some delay, the pictures are rendered, replacing the placeholders, to form the complete message
Now, select "File" and "Print" -- notice that the preview is not immediately displayed. There is a delay while thos same embedded pictures are downloaded, again. Sometimes there will be a pop-up notification that Outlook is "communicating with
the server"
Eventually the message is fully rendered with all embedded pictures
Now, select a different printer -- notice that the preview disappears and it takes time to .... yes, redownload those same pictures, again.
Finally, click on "Print" -- notice yet another delay for a final download to rerender the message for the printer.
Having done all that, close Outlook, disconnect from the network (turn off wireless or disconnect wire), open Outlook and view that same message. The x placeholders are shown instead of the embedded pictures. Although those embedded pictures
were downloaded multiple times already, they were not persisted locally.
Outlook 2003 and 2007 correct ask for confirmation to save the pictures locally then does so. Printing and viewing is then possible without having to redownload those pictures.
Is there going to be a fix for this Outlook 2010 defect? I've been waiting, applying updates, and waiting.....Please do not close this thread. The issue remains. I apologize for not checking back sooner. I thought I would get pinged by email when this tread was updated; I did not. I'll monitor more closely in the future.
First, please note that I explicitly set Outlook to NOT download pictures automatically. I want to be prompted to download. However, after confirmed that I want the download, I expect pictures related to the message to be downloaded only once,
immediately after I confirm that I want them downloaded.
I have confirmed many times that the behavior in this area is NOT identical between 2003, 2007 and 2010. In particular, 2007 does download once and store locally (if user confirms to save changes when prompted), as expected, and 2010 downloads each
view/preview/print.
This is quite easy to verify -- simply unplug any network cable, disable wireless, etc. In other words completely detach from the networked world. 2007 will correctly view/preview/etc. from local storage whereas 2010 always reverts to showing
placeholders for any embedded images. This is 100% repeatable.
As an additional verification, simply move the .pst file to another system that is not connected to any network. Open the .pst file with 2007 and any embedded images that were already downloaded (and saved) are there, with 2010 they are not.
With 2010, it is bad enough that embedded images are not saved for viewing when disconnected. Worse than that, the repeated downloads can be a significant disruption to performance. Just get on a really slow wireless connection as is typical
in some hotels. Then try to view and print messages with lots of embedded pictures. Slow takes on a whole new, even slower, meaning.
This 2010 defect has been reproduced. Is there a KB article, Windows Update, hotfix,.... anything available to eliminate this problem of repeated downloads of embedded pictures? -
Compiling jsp pages in wl 10.0 2 times slower than wl 9.1
Hi:
I have enterprise application. In weblogic 9 it took 4-5min to compile all the jsp pages, in weblogic 10 it takes 10-11min!!
Is there anything I can do to speed it up?Hi, thanks for your answers.
Yes, I actually build the ear file and then I call weblogic.appc on it. And again, on wl 9 it used to take 4-5min, now it is taking 10-11min. Most of the time of the build process is taken by the page compilation.
The other thing I noticed is that if I change a page the time it takes WL to recompile the page is way longer than before. I have to wait for a good 14-15seconds until the weblogic returns the new page. The weblogic java process goes up to almost 100%. Before, in WL 9 I had to wait just a few seconds. And ok, my computer is a dual core at 2.33GHz. Don't tell me I need to upgrade :-).
I realize that the jsp compilation must have gotten more complicated because now jsf & jsp are unified but still....
My app is a jsf application and I also use tag files.
About precompiling the pages... I build the application on windows then I deploy it on linux. In WL 9, whenever I deployed the app, I had to precompile the pages otherwise the users experienced slower responses the first time. For whatever reason WL 9 didn't think the pages were already precompiled (they were part of the ear file). In WL 10 that seemed to have been fixed. -
Oh my God Prepared Statements are about 80 times slower than multiple inser
I am highly suprised that in my programme a normal statement os a lot faster than a Prepared Statement. I am posting below both the Programmes, in one I am using Prepared Statements and in another I am using normal Statements. My OS is Win NT My Database is SQL Server 7. THe progamme extracts data from a file and inserts records in the database. In the test case I had A file of about 1440 records ie. 1440 inserts are made to the database, The database table is very large ie. It has around 126 Columns.
So for inserting 1440 record froma file the Prepared Statements take around 7 Minutes . And for reading the same file and inserting the same no of records in the same database normal Statements Take only about 7 seconds. Now the JAcva docs clearly Specify that when we need to use the same stmt many times it is better to use Prepared Satements < the results that I am Getting is clear and complete violation of what java docs say.
Below is the code with Prepared Statements
package mps.mpsPTLF;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import gen.genCommon.genConnectionPool.*;
import gen.genCommon.*;
public class PTLFProcessor
private static clsLogFile moLogFile = new clsLogFile("");
private gen.genCommon.genConnectionPool.SharedConnectionPool mConnPool = SharedConnectionPool.getInstance(2);
FileReader fPTLF = null;
BufferedReader brPTLF = null;
//**************** Begin Constructor declaration ************************
To intialize the class variables for new Fee
public PTLFProcessor(String pathPTLF) throws GenException
try
fPTLF = new FileReader(pathPTLF);
brPTLF = new BufferedReader(fPTLF);
catch (Exception e)
throw new GenException("Error Accessing file : " + pathPTLF + " - " + e.toString(),e );
//**************** End Constructor declaration ************************
public void PTLFGetData() throws GenException
char pcData[];
int HEADERSIZE = 6;
boolean pbEndOfFile = false;
boolean pbisFirstBlock = true;
int piBlocksize = 0;
int piOffset = 0;
int piRecordsize = 0;
String psRecordContent = "";
Connection pConn = null;
try
String psInsSql=" INSERT INTO FILE_PTLF_IN ( " +
" fpi_DAT_TIM , " +
" fpi_REC_TYP , " +
" fpi_CRD_LN , " +
" fpi_CRD_FIID , " +
" fpi_CRD_NUM , " +
" fpi_MBR_NUM , " +
" fpi_MER_LN , " +
" fpi_MER_FIID , " +
" fpi_MER_GRP , " +
" fpi_MER_REGN , " +
" fpi_MER_ID , " +
" fpi_TERM_ID , " +
" fpi_SHIFT_NUM , " +
" fpi_BATCH_NUM , " +
" fpi_TERM_LN , " +
" fpi_TERM_FIID , " +
" fpi_TERM_ID_1 , " +
" fpi_TRAN , " +
" fpi_TERM_ID_2 , " +
" fpi_REC_FRMT , " +
" fpi_MER_ID_1 , " +
" fpi_CLERK_ID , " +
" fpi_DATA_FLAG , " +
" fpi_TYP , " +
" fpi_RTE_STAT , " +
" fpi_ORIGINATOR , " +
" fpi_RESPONDER , " +
" fpi_ISS_CDE , " +
" fpi_ENTRY_TIM , " +
" fpi_EXIT_TIM , " +
" fpi_RE_ENTRY_TIM , " +
" fpi_TRAN_DAT , " +
" fpi_TRAN_TIM , " +
" fpi_POST_DAT , " +
" fpi_ACQ_ICHG_SETL_DAT , " +
" fpi_ISS_ICHG_SETL_DAT , " +
" fpi_SEQ_NUM , " +
" fpi_TERM_NAME_LOC , " +
" fpi_TERM_OWNER_NAME , " +
" fpi_TERM_CITY , " +
" fpi_TERM_ST , " +
" fpi_TERM_CNTRY_CDE , " +
" fpi_BRCH_ID , " +
" fpi_USER_FLD2 , " +
" fpi_TERM_TIM_OFST , " +
" fpi_ACQ_INST_ID_NUM , " +
" fpi_RCV_INST_ID_NUM , " +
" fpi_TERM_TYP , " +
" fpi_CLERK_ID_1 , " +
" fpi_GRP , " +
" fpi_USER_ID , " +
" fpi_RETL_SIC_CDE , " +
" fpi_ORIG , " +
" fpi_DEST , " +
" fpi_TC , " +
" fpi_T , " +
" fpi_AA , " +
" fpi_C , " +
" fpi_CRD_TYP , " +
" fpi_ACCT , " +
" fpi_RESP_CDE , " +
" fpi_AMT_1 , " +
" fpi_AMT_2 , " +
" fpi_EXP_DAT , " +
" fpi_TRACK2 , " +
" fpi_PIN_OFST , " +
" fpi_PRE_AUTH_SEQ_NUM , " +
" fpi_INVOICE_NUM , " +
" fpi_ORIG_INVOICE_NUM , " +
" fpi_AUTHORIZER , " +
" fpi_AUTH_IND , " +
" fpi_SHIFT_NUM_1 , " +
" fpi_BATCH_SEQ_NUM , " +
" fpi_APPRV_CDE , " +
" fpi_APPRV_CDE_LGTH , " +
" fpi_ICHG_RESP , " +
" fpi_PSEUDO_TERM_ID , " +
" fpi_RFRL_PHONE , " +
" fpi_DFT_CAPTURE_FLG , " +
" fpi_SETL_FLAG , " +
" fpi_RVRL_CDE , " +
" fpi_REA_FOR_CHRGBCK , " +
" fpi_NUM_OF_CHRGBCK , " +
" fpi_PT_SRV_COND_CDE , " +
" fpi_PT_SRV_ENTRY_MDE , " +
" fpi_AUTH_IND2 , " +
" fpi_ORIG_CRNCY_CDE , " +
" fpi_AUTH_CRNCY_CDE , " +
" fpi_AUTH_CONV_RATE , " +
" fpi_SETL_CRNCY_CDE , " +
" fpi_SETL_CONV_RATE , " +
" fpi_CONV_DAT_TIM , " +
" fpi_IMP_IND , " +
" fpi_AVAIL_BAL , " +
" fpi_LEDG_BAL , " +
" fpi_AMT_ON_HOLD , " +
" fpi_TTL_FLOAT , " +
" fpi_CUR_FLOAT , " +
" fpi_ADJ_SETL_IMPACT_FLG , " +
" fpi_PBF1 , " +
" fpi_PBF2 , " +
" fpi_PBF3 , " +
" fpi_PBF4 , " +
" fpi_FRWD_INST_ID_NUM , " +
" fpi_CRD_ACCPT_ID_NUM , " +
" fpi_CRD_ISS_ID_NUM , " +
" fpi_ORIG_MSG_TYP , " +
" fpi_ORIG_TRAN_TIM , " +
" fpi_ORIG_TRAN_DAT , " +
" fpi_ORIG_SEQ_NUM , " +
" fpi_ORIG_B24_POST_DAT , " +
" fpi_EXCP_RSN_CDE , " +
" fpi_OVRRDE_FLG , " +
" fpi_ADDR , " +
" fpi_ZIP_CDE , " +
" fpi_ADDR_VRFY_STAT , " +
" fpi_PIN_IND , " +
" fpi_PIN_TRIES , " +
" fpi_PRE_AUTH_TS_DAT , " +
" fpi_PRE_AUTH_TS_TIM , " +
" fpi_PRE_AUTH_HLDS_LVL , " +
" fpi_USER_FLD5 , " +
" fpi_LEN , " +
" fpi_INFO )" +
" VALUES ( " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
pConn = mConnPool.getConnection();
PreparedStatement pStmt = pConn.prepareStatement(psInsSql);
while (!pbEndOfFile)
pcData = new char [HEADERSIZE]; // Reading each Block Header
brPTLF.read (pcData, 0, HEADERSIZE);
piBlocksize = Integer.parseInt (new String (pcData));
piOffset = HEADERSIZE;
while (piOffset < piBlocksize)
{ // Read the records upto end of block
pcData = new char [HEADERSIZE]; // Reading each Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE]; // Reading each Record Content
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
moLogFile.writeToLog(psRecordContent);
if (pbisFirstBlock)
if (!psRecordContent.startsWith ("TH"))
throw new GenException ("Invalid File Format, missing 'TH'");
pcData = new char [HEADERSIZE]; // Reading next Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE];// Reading next Record Content (Must be FH)
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (!psRecordContent.startsWith ("FH"))
throw new GenException ("File Header Not Found");
pbisFirstBlock = false;
else if (psRecordContent.startsWith ("DR"))
psRecordContent = psRecordContent.substring(2);
/* if (psRecordContent.length() != 1820 ) // && psRecordContent.length() != 846)
// insert in error table
continue;
if ( psRecordContent.substring(453-1, 455).equals ("000") || psRecordContent.substring(453-1, 455).equals ("001") )
pStmt.setString (1, psRecordContent.substring(1-1,19));
pStmt.setString (2, psRecordContent.substring(20-1,21));
pStmt.setString (3, psRecordContent.substring(22-1,25));
pStmt.setString (4, psRecordContent.substring(26-1,29));
pStmt.setString (5, psRecordContent.substring(30-1,48));
pStmt.setString (6, psRecordContent.substring(49-1,51));
pStmt.setString (7, psRecordContent.substring(52-1,55));
pStmt.setString (8, psRecordContent.substring(56-1,59));
pStmt.setString (9, psRecordContent.substring(60-1,63));
pStmt.setString (10, psRecordContent.substring(64-1,67));
pStmt.setString (11, psRecordContent.substring(68-1,86));
pStmt.setString (12, psRecordContent.substring(87-1,102));
pStmt.setString (13, psRecordContent.substring(103-1,105));
pStmt.setString (14, psRecordContent.substring(106-1,108));
pStmt.setString (15, psRecordContent.substring(109-1,112));
pStmt.setString (16, psRecordContent.substring(113-1,116));
pStmt.setString (17, psRecordContent.substring(117-1,132));
pStmt.setString (18, psRecordContent.substring(133-1,140));
pStmt.setString (19, psRecordContent.substring(141-1,156));
pStmt.setString (20, psRecordContent.substring(157-1,157));
pStmt.setString (21, psRecordContent.substring(158-1,176));
pStmt.setString (22, psRecordContent.substring(177-1,182));
pStmt.setString (23, psRecordContent.substring(183-1,183));
pStmt.setString (24, psRecordContent.substring(184-1,187));
pStmt.setString (25, psRecordContent.substring(188-1,189));
pStmt.setString (26, psRecordContent.substring(190-1,190));
pStmt.setString (27, psRecordContent.substring(191-1,191));
pStmt.setString (28, psRecordContent.substring(192-1,193));
pStmt.setString (29, psRecordContent.substring(194-1,212));
pStmt.setString (30, psRecordContent.substring(213-1,231));
pStmt.setString (31, psRecordContent.substring(232-1,250));
pStmt.setString (32, psRecordContent.substring(251-1,256));
pStmt.setString (33, psRecordContent.substring(257-1,264));
pStmt.setString (34, psRecordContent.substring(265-1,270));
pStmt.setString (35, psRecordContent.substring(271-1,276));
pStmt.setString (36, psRecordContent.substring(277-1,282));
pStmt.setString (37, psRecordContent.substring(283-1,294));
pStmt.setString (38, psRecordContent.substring(295-1,319));
pStmt.setString (39, psRecordContent.substring(320-1,341));
pStmt.setString (40, psRecordContent.substring(342-1,354));
pStmt.setString (41, psRecordContent.substring(355-1,357));
pStmt.setString (42, psRecordContent.substring(358-1,359));
pStmt.setString (43, psRecordContent.substring(360-1,363));
pStmt.setString (44, psRecordContent.substring(364-1,366));
pStmt.setString (45, psRecordContent.substring(367-1,371));
pStmt.setString (46, psRecordContent.substring(372-1,382));
pStmt.setString (47, psRecordContent.substring(383-1,393));
pStmt.setString (48, psRecordContent.substring(394-1,395));
pStmt.setString (49, psRecordContent.substring(396-1,401));
pStmt.setString (50, psRecordContent.substring(402-1,405));
pStmt.setString (51, psRecordContent.substring(406-1,413));
pStmt.setString (52, psRecordContent.substring(414-1,417));
pStmt.setString (53, psRecordContent.substring(418-1,421));
pStmt.setString (54, psRecordContent.substring(422-1,425));
pStmt.setString (55, psRecordContent.substring(426-1,427));
pStmt.setString (56, psRecordContent.substring(428-1,428));
pStmt.setString (57, psRecordContent.substring(429-1,430));
pStmt.setString (58, psRecordContent.substring(431-1,431));
pStmt.setString (59, psRecordContent.substring(432-1,433));
pStmt.setString (60, psRecordContent.substring(434-1,452));
pStmt.setString (61, psRecordContent.substring(453-1,455));
pStmt.setString (62, psRecordContent.substring(456-1,474));
pStmt.setString (63, psRecordContent.substring(475-1,493));
pStmt.setString (64, psRecordContent.substring(494-1,497));
pStmt.setString (65, psRecordContent.substring(498-1,537));
pStmt.setString (66, psRecordContent.substring(538-1,553));
pStmt.setString (67, psRecordContent.substring(554-1,565));
pStmt.setString (68, psRecordContent.substring(566-1,575));
pStmt.setString (69, psRecordContent.substring(576-1,585));
pStmt.setString (70, psRecordContent.substring(586-1,601));
pStmt.setString (71, psRecordContent.substring(602-1,602));
pStmt.setString (72, psRecordContent.substring(603-1,605));
pStmt.setString (73, psRecordContent.substring(606-1,608));
pStmt.setString (74, psRecordContent.substring(609-1,616));
pStmt.setString (75, psRecordContent.substring(617-1,617));
pStmt.setString (76, psRecordContent.substring(618-1,625));
pStmt.setString (77, psRecordContent.substring(626-1,629));
pStmt.setString (78, psRecordContent.substring(630-1,649));
pStmt.setString (79, psRecordContent.substring(650-1,650));
pStmt.setString (80, psRecordContent.substring(651-1,651));
pStmt.setString (81, psRecordContent.substring(652-1,653));
pStmt.setString (82, psRecordContent.substring(654-1,655));
pStmt.setString (83, psRecordContent.substring(656-1,656));
pStmt.setString (84, psRecordContent.substring(657-1,658));
pStmt.setString (85, psRecordContent.substring(659-1,661));
pStmt.setString (86, psRecordContent.substring(662-1,662));
pStmt.setString (87, psRecordContent.substring(663-1,665));
pStmt.setString (88, psRecordContent.substring(666-1,668));
pStmt.setString (89, psRecordContent.substring(669-1,676));
pStmt.setString (90, psRecordContent.substring(677-1,679));
pStmt.setString (91, psRecordContent.substring(680-1,687));
pStmt.setString (92, psRecordContent.substring(688-1,706));
pStmt.setString (93, psRecordContent.substring(707-1,707));
pStmt.setString (94, psRecordContent.substring(708-1,708));
pStmt.setString (95, psRecordContent.substring(709-1,709));
pStmt.setString (96, psRecordContent.substring(710-1,710));
pStmt.setString (97, psRecordContent.substring(711-1,711));
pStmt.setString (98, psRecordContent.substring(712-1,712));
pStmt.setString (99, psRecordContent.substring(713-1,713));
pStmt.setString (100, psRecordContent.substring(714-1,714));
pStmt.setString (101, psRecordContent.substring(715-1,715));
pStmt.setString (102, psRecordContent.substring(716-1,716));
pStmt.setString (103, psRecordContent.substring(717-1,717));
pStmt.setString (104, psRecordContent.substring(718-1,728));
pStmt.setString (105, psRecordContent.substring(729-1,739));
pStmt.setString (106, psRecordContent.substring(740-1,750));
pStmt.setString (107, psRecordContent.substring(751-1,754));
pStmt.setString (108, psRecordContent.substring(755-1,762));
pStmt.setString (109, psRecordContent.substring(763-1,766));
pStmt.setString (110, psRecordContent.substring(767-1,778));
pStmt.setString (111, psRecordContent.substring(779-1,782));
pStmt.setString (112, psRecordContent.substring(783-1,785));
pStmt.setString (113, psRecordContent.substring(786-1,786));
pStmt.setString (114, psRecordContent.substring(787-1,806));
pStmt.setString (115, psRecordContent.substring(807-1,815));
pStmt.setString (116, psRecordContent.substring(816-1,816));
pStmt.setString (117, psRecordContent.substring(817-1,817));
pStmt.setString (118, psRecordContent.substring(818-1,818));
pStmt.setString (119, psRecordContent.substring(819-1,824));
pStmt.setString (120, psRecordContent.substring(825-1,832));
pStmt.setString (121, psRecordContent.substring(833-1,833));
pStmt.setString (122, psRecordContent.substring(834-1,866));
pStmt.setString (123, psRecordContent.substring(867-1,870));
pStmt.setString (124, psRecordContent.substring(871-1,1070));
if (pStmt.executeUpdate() != 1)
throw new GenException ("Insertion failed");
String psMsgType = psRecordContent.substring (184-1, 187);
if (true)//updateTable (conn, pstmt, pstmt1, pstmt2, psRecordContent, out, bw))
if (psMsgType.equals ("0500") || psMsgType.equals ("0520"))
//piSettlementDR++;
if (psMsgType.equals ("0210"))
//piUpdatedDR++;
if (psMsgType.equals ("0220") || psMsgType.equals ("0320") || psMsgType.equals ("0420"))
//reversalDR++;
//validDR++;
//totalDR++;
else if (psRecordContent.startsWith ("FT"))
pcData = new char [HEADERSIZE]; // Reading next Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE];// Reading next Record Content (Must be TT)
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (!psRecordContent.startsWith ("TT"))
throw new GenException ("Total Trailer not Found.");
pbEndOfFile = true;
} // while (piOffset < piBlocksize)
} // while (!pbEndOfFile)
brPTLF.close();
fPTLF.close();
pStmt.close();
catch (Exception e)
moLogFile.printStackTrace(e);
finally
mConnPool.free(pConn);
public static void main(String args[])
try
PTLFProcessor test=new PTLFProcessor("c:\\test.txt");
test.PTLFGetData();
catch (Exception e)
clsLogFile.printStackTrace(e);
}Now is the code with normal Statements
//package mps.mpsPTLF;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import gen.genCommon.genConnectionPool.*;
import gen.genCommon.*;
public class PTLFProcessor1
private static clsLogFile moLogFile = new clsLogFile("");
private gen.genCommon.genConnectionPool.SharedConnectionPool mConnPool = SharedConnectionPool.getInstance(2);
FileReader fPTLF = null;
BufferedReader brPTLF = null;
//**************** Begin Constructor declaration ************************
To intialize the class variables for new Fee
public PTLFProcessor1(String pathPTLF) throws GenException
try
fPTLF = new FileReader(pathPTLF);
brPTLF = new BufferedReader(fPTLF);
catch (Exception e)
throw new GenException("Error Accessing file : " + pathPTLF + " - " + e.toString(),e );
//**************** End Constructor declaration ************************
public void PTLFGetData() throws GenException
char pcData[];
int HEADERSIZE = 6;
boolean pbEndOfFile = false;
boolean pbisFirstBlock = true;
int piBlocksize = 0;
int piOffset = 0;
int piRecordsize = 0;
String psRecordContent = "";
Connection pConn = null;
int cnt=0;
try
String psInsSql=" INSERT INTO FILE_PTLF_IN ( " +
" fpi_DAT_TIM , " +
" fpi_REC_TYP , " +
" fpi_CRD_LN , " +
" fpi_CRD_FIID , " +
" fpi_CRD_NUM , " +
" fpi_MBR_NUM , " +
" fpi_MER_LN , " +
" fpi_MER_FIID , " +
" fpi_MER_GRP , " +
" fpi_MER_REGN , " +
" fpi_MER_ID , " +
" fpi_TERM_ID , " +
" fpi_SHIFT_NUM , " +
" fpi_BATCH_NUM , " +
" fpi_TERM_LN , " +
" fpi_TERM_FIID , " +
" fpi_TERM_ID_1 , " +
" fpi_TRAN , " +
" fpi_TERM_ID_2 , " +
" fpi_REC_FRMT , " +
" fpi_MER_ID_1 , " +
" fpi_CLERK_ID , " +
" fpi_DATA_FLAG , " +
" fpi_TYP , " +
" fpi_RTE_STAT , " +
" fpi_ORIGINATOR , " +
" fpi_RESPONDER , " +
" fpi_ISS_CDE , " +
" fpi_ENTRY_TIM , " +
" fpi_EXIT_TIM , " +
" fpi_RE_ENTRY_TIM , " +
" fpi_TRAN_DAT , " +
" fpi_TRAN_TIM , " +
" fpi_POST_DAT , " +
" fpi_ACQ_ICHG_SETL_DAT , " +
" fpi_ISS_ICHG_SETL_DAT , " +
" fpi_SEQ_NUM , " +
" fpi_TERM_NAME_LOC , " +
" fpi_TERM_OWNER_NAME , " +
" fpi_TERM_CITY , " +
" fpi_TERM_ST , " +
" fpi_TERM_CNTRY_CDE , " +
" fpi_BRCH_ID , " +
" fpi_USER_FLD2 , " +
" fpi_TERM_TIM_OFST , " +
" fpi_ACQ_INST_ID_NUM , " +
" fpi_RCV_INST_ID_NUM , " +
" fpi_TERM_TYP , " +
" fpi_CLERK_ID_1 , " +
" fpi_GRP , " +
" fpi_USER_ID , " +
" fpi_RETL_SIC_CDE , " +
" fpi_ORIG , " +
" fpi_DEST , " +
" fpi_TC , " +
" fpi_T , " +
" fpi_AA , " +
" fpi_C , " +
" fpi_CRD_TYP , " +
" fpi_ACCT , " +
" fpi_RESP_CDE , " +
" fpi_AMT_1 , " +
" fpi_AMT_2 , " +
" fpi_EXP_DAT , " +
" fpi_TRACK2 , " +
" fpi_PIN_OFST , " +
" fpi_PRE_AUTH_SEQ_NUM , " +
" fpi_INVOICE_NUM , " +
" fpi_ORIG_INVOICE_NUM , " +
" fpi_AUTHORIZER , " +
" fpi_AUTH_IND , " +
" fpi_SHIFT_NUM_1 , " +
" fpi_BATCH_SEQ_NUM , " +
" fpi_APPRV_CDE , " +
" fpi_APPRV_CDE_LGTH , " +
" fpi_ICHG_RESP , " +
" fpi_PSEUDO_TERM_ID , " +
" fpi_RFRL_PHONE , " +
" fpi_DFT_CAPTURE_FLG , " +
" fpi_SETL_FLAG , " +
" fpi_RVRL_CDE , " +
" fpi_REA_FOR_CHRGBCK , " +
" fpi_NUM_OF_CHRGBCK , " +
" fpi_PT_SRV_COND_CDE , " +
" fpi_PT_SRV_ENTRY_MDE , " +
" fpi_AUTH_IND2 , " +
" fpi_ORIG_CRNCY_CDE , " +
" fpi_AUTH_CRNCY_CDE , " +
" fpi_AUTH_CONV_RATE , " +
" fpi_SETL_CRNCY_CDE , " +
" fpi_SETL_CONV_RATE , " +
" fpi_CONV_DAT_TIM , " +
" fpi_IMP_IND , " +
" fpi_AVAIL_BAL , " +
" fpi_LEDG_BAL , " +
" fpi_AMT_ON_HOLD , " +
" fpi_TTL_FLOAT , " +
" fpi_CUR_FLOAT , " +
" fpi_ADJ_SETL_IMPACT_FLG , " +
" fpi_PBF1 , " +
" fpi_PBF2 , " +
" fpi_PBF3 , " +
" fpi_PBF4 , " +
" fpi_FRWD_INST_ID_NUM , " +
" fpi_CRD_ACCPT_ID_NUM , " +
" fpi_CRD_ISS_ID_NUM , " +
" fpi_ORIG_MSG_TYP , " +
" fpi_ORIG_TRAN_TIM , " +
" fpi_ORIG_TRAN_DAT , " +
" fpi_ORIG_SEQ_NUM , " +
" fpi_ORIG_B24_POST_DAT , " +
" fpi_EXCP_RSN_CDE , " +
" fpi_OVRRDE_FLG , " +
" fpi_ADDR , " +
" fpi_ZIP_CDE , " +
" fpi_ADDR_VRFY_STAT , " +
" fpi_PIN_IND , " +
" fpi_PIN_TRIES , " +
" fpi_PRE_AUTH_TS_DAT , " +
" fpi_PRE_AUTH_TS_TIM , " +
" fpi_PRE_AUTH_HLDS_LVL , " +
" fpi_USER_FLD5 , " +
" fpi_LEN , " +
" fpi_INFO )" +
" VALUES ";
( " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, " +
pConn = mConnPool.getConnection();
Statement Stmt=pConn.createStatement();
while (!pbEndOfFile)
pcData = new char [HEADERSIZE]; // Reading each Block Header
brPTLF.read (pcData, 0, HEADERSIZE);
piBlocksize = Integer.parseInt (new String (pcData));
piOffset = HEADERSIZE;
while (piOffset < piBlocksize)
{ // Read the records upto end of block
pcData = new char [HEADERSIZE]; // Reading each Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE]; // Reading each Record Content
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (pbisFirstBlock)
if (!psRecordContent.startsWith ("TH"))
throw new GenException ("Invalid File Format, missing 'TH'");
pcData = new char [HEADERSIZE]; // Reading next Record Header
brPTLF.read (pcData, 0, HEADERSIZE);
piRecordsize = Integer.parseInt (new String (pcData));
piOffset += HEADERSIZE;
pcData = new char [piRecordsize - HEADERSIZE];// Reading next Record Content (Must be FH)
brPTLF.read (pcData, 0, piRecordsize - HEADERSIZE);
psRecordContent = new String (pcData);
piOffset += piRecordsize - HEADERSIZE;
if (!psRecordContent.startsWith ("FH"))
throw new GenException ("File Header Not Found");
pbisFirstBlock = false;
else if (psRecordContent.startsWith ("DR"))
psRecordContent = psRecordContent.substring(2);
/* if (psRecordContent.length() != 1820 ) // && psRecordContent.length() != 846)
// insert in error table
continue;
String psValues = null;
if ( psRecordContent.substring(453-1, 455).equals ("000") || psRecordContent.substring(453-1, 455).equals ("001") )
psValues = "('" + psRecordContent.substring(1-1,19) + "','" +
psRecordContent.substring(20-1,21) + "','" +
psRecordContent.substring(22-1,25) + "','" +
psRecordContent.substring(26-1,29) + "','" +
psRecordContent.substring(30-1,48) + "','" +
psRecordContent.substring(49-1,51) + "','" +
psRecordContent.substring(52-1,55) + "','" +
psRecordContent.substring(56-1,59) + "','" +
psRecordContent.substring(60-1,63) + "','" +
psRecordContent.substring(64-1,67) + "','" +
psRecordContent.substring(68-1,86) + "','" +
psRecordContent.substring(87-1,102) + "','" +
psRecordContent.substring(103-1,105) + "','" +
psRecordContent.substring(106-1,108) + "','" +
psRecordContent.substring(109-1,112) + "','" +
psRecordContent.substring(113-1,116) + "','" +
psRecordContent.substring(117-1,132) + "','" +
psRecordContent.substring(133-1,140) + "','" +
psRecordContent.substring(141-1,156) + "','" +
psRecordContent.substring(157-1,157) + "','" +
psRecordContent.substring(158-1,176) + "','" +
psRecordContent.substring(177-1,182) + "','" +
psRecordContent.substring(183-1,183) + "','" +
psRecordContent.substring(184-1,187) + "','" +
psRecordContent.substring(188-1,189) + "','" +
psRecordContent.substring(190-1,190) + "','" +
psRecordContent.substring(191-1,191) + "','" +
psRecordContent.substring(192-1,193) + "','" +
psRecordContent.substring(194-1,212) + "','" +
psRecordContent.substring(213-1,231) + "','" +
psRecordContent.substring(232-1,250) + "','" +
psRecordContent.substring(251-1,256) + "','" +
psRecordContent.substring(257-1,264) + "','" +
psRecordContent.substring(265-1,270) + "','" +
psRecordContent.substring(271-1,276) + "','" +
psRecordContent.substring(277-1,282) + "','" +
psRecordContent.substring(283-1,294) + "','" +
psRecordContent.substring(295-1,319) + "','" +
psRecordContent.substring(320-1,341) + "','" +
psRecordContent.substring(342-1,354) + "','" +
psRecordContent.substring(355-1,357) + "','" +
psRecordContent.substring(358-1,359) + "','" +
psRecordContent.substring(360-1,363) + "','" +
You posted this question in several other forums. Please don't do that.
-
Ipa-ad-hoc 5 times slower than ipa-test
Hello,
I have successfully packaged my quite big app (3.5 MB swf and 24MB whole ipa file) in ipa-test package and it works quite good
But after compilation in ipa-ad-hoc package it is much slower - about 5 times, when loading and during work, especially when i.e. clicking an action for the first time (second time it is faster but not as fast as in ipa-test)
Is it possible? I've thought that these types of packages are the same - that this is compiled native code for iOS, and difference is only in certificates
I use 3.2 AIR, 4.6.0 Flex, Helo theme in compability mode for Flex 3 (unfortunately I cannot now switch to Spark components)
On android it works very ok (better even than in ipa-test mode), but I also would like have this app for iOS
Regards
AdamTry - maybe they can help, I couldnt find anybody who had this problem.
Maybe you could make new project and check if it works fast enough in ad-hoc and then copy some pieces of your project to this new project... I sometimes use to find an error cutting project in half and looking for error, stupid but works Good luck
Maybe you are looking for
-
One old iTunes account and an iPad with a new .me account
I'm trying to syn my music from my iMac to my iPad. I have a new .me address for iCloud and Face Time but i have quite a lot of music brought in iTunes on my old iTunes account. in order for my mac to accept my iPad I understand the iPad needs to be
-
We have any certification for OWB
PLS say any certification for owb,I know that informatica has 3 levels of certification.but i dont know abt OWB. please let me know... sen Edited by: user8723816 on Mar 26, 2010 3:49 AM Edited by: user8723816 on Mar 26, 2010 3:49 AM
-
Hi All, If anybody having the dosuments regarding the difference between release 4.6b and ECC 6.0 from SD point of view, then plz forward to my mail id: [email protected] its very urgent!! thanks in advance Ipsit
-
i was using tomcat , wen i use localhost:8080 , i use to get into web_inf (TOMCAT MANAGER)in tomcat, now i installed oracle 9i but wen i use localhost:8080 i couldnt get into the previous web_inf what should i do how to change the settings
-
Error -1074360293 (IMAQdx Timeout) after running acquisition for some time
My vision application in LabVIEW does several acquisitions and processings successful but then the acquisition (grab) suddenly fails with a timeout error (-1074360293, IMAQdx: Timeout). The error does not happen when only acquiring the images. After