ImportASCII - English OS takes 8 seconds; German OS takes 20 Minutes

syalamar at fiberlink.com syalamar at fiberlink.com
Tue Nov 16 19:53:12 CST 2004


Hi ,

Following is the code snippet where I have the problem.
Please read the comments.

Any idea what could be happening?

// SQLEXECUTE - DELETING ROWS FROM POP_DETAIL TABLE

db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 1 and 
COUNTRY_CD in (44, 41, 46, 34, 351, 47, 31, 352, 39, 353, 354, 30, 49, 33, 
358, 45, 32, 43)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 1 and 
COUNTRY_CD in (976, 977, 98, 993, 994, 995, 996, 998, 975, 850, 853, 855, 
856, 870, 871, 872, 873, 874, 880, 90, 92, 93, 94, 95, 960, 961, 962, 963, 
964, 965, 966, 967, 968, 971, 972, 973, 974, 84, 670, 6701, 6702, 672, 
6722, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 
686, 687, 688, 689, 690, 691, 692, 7, 705, 708, 800, 505, 508, 53, 5399, 
5901, 597, 599, 6101, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 
380, 381, 385, 386, 387, 389, 40, 420, 421, 423, 48, 500, 501, 36, 101, 
102, 104, 106, 108, 109, 111, 113, 115, 116, 117, 118, 120, 122, 123, 124, 
20, 212, 213, 216, 218, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 
230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 
245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 260, 
261, 262, 263, 264, 265, 266, 267, 268, 269, 2691, 27, 290, 291, 297, 298, 
299, 350, 355, 356, 357, 359, 0)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 278 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 22 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 176 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 24 and 
COUNTRY_CD in (58, 598, 121, 51, 595, 507, 52, 596, 112, 504, 509, 592, 
502, 590, 594, 503, 593, 110, 506, 57, 56, 55, 591, 105, 103, 54)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 199 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 36 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 176 and 
COUNTRY_CD in (66, 886, 65, 63, 64, 60, 82, 81, 62, 91, 852, 86, 61)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 258 and 
COUNTRY_CD in (66, 886, 65, 63, 64, 60, 82, 81, 62, 91, 852, 86, 61)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 3 and 
COUNTRY_CD in (66, 886, 65, 63, 64, 60, 82, 81, 62, 91, 852, 86, 61)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 279 and 
COUNTRY_CD in (66, 886, 65, 63, 64, 60, 82, 81, 62, 91, 852, 86, 61)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 24 and 
COUNTRY_CD in (66, 886, 65, 63, 64, 60, 82, 81, 62, 91, 852, 86, 61)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 21 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 219 and 
COUNTRY_CD in (1, 107)");
db->SqlExecute("DELETE FROM pop_detail where PROVIDER_ID = 41 and 
COUNTRY_CD in (1, 107)");

// IMPORTING FROM A TEXT FILE THAT HAS LESSER FIELDS THAN THE BASE OBJECT 
ITSELF

CString strSQL;
strSQL = _T("select POP_DETAIL_ID,  COMMAND,  COUNTRY_CD,  STATE_CD, \
                            CITY_CD,  AREA_CD,  EXCHANGE_CD, PHONE_NUMBER, 
 PROVIDER_ID, \
                                                        ISP_ID, 
CONNECTION_TYPE,  MIN_BAUD,  MAX_BAUD,  CRIPT_NAME, \
                                                        POP_QUALITY, 
DNS_SETTING,  DNS_SETTING_1,  DNS_SETTING_2, \
                                                        CHAP_SUPPORT, 
NPANXX,  CENTER_ID,  TERMINAL_SUPPORT, \
                                                        POP_COST, 
ISDN_CHANNELS,  AUTH_TYPE, \
                                                        SCRIPT_TYPE from 
POP_DETAIL_TEMP");

ECursorLocation eCurLoc = kServerBulk; // kClient / kServer / kServerBulk
ELockType eLocType = kNoLock; // kNoLock / kReadOnly / kReadWrite
ECursorDirection eCurDir = kRandom; // kForwardOnly / kRandom

VDK_Cursor* pCursor = db->SqlSelect(strSQL, eCurLoc , eLocType, eCurDir);
pCursor->ImportASCII(_T(".\\input.tab"));

// ON AN ENGLISH WINDOWS XP SP1 MACHINE - THE IMPORTASCII CALL TAKES LESS 
THAN 8 SECONDS - NO PROBLEMS AT ALL


// ON A GERMAN WINDOWS XP SP1 MACHINE - THE SAME IMPORTASCII CALL TAKES 
ABOUT 20 MINUTES.
// IF I MOVE THE IMPORTASCII CALL BEFORE THE DELETE SQLEXECUTE STATEMENTS, 
IT TAKES LESS THAN 8 SECONDS.
// LOOKS LIKE SOMETHING IN THE DELETE SQLEXECUTE CALLS IS CAUSING SOME 
THING TO SLOW DOWN THE IMPORTASCII CALL.
// I TRIED db->Flush() AFTER EACH CALL TO SQLEXECUTE - STILL THE SAME 
PROBLEM.

// ANY IDEA WHAT COULD BE HAPPENING.



Regards,
Srini Yalamarti
Fiberlink Communications Corporation
(215)793-6559 (Office)
(610)462-8023 (Cell)
http://www.fiberlink.com

The information transmitted is intended only for the person or entity to 
which it is addressed and may contain confidential and/or privileged 
material.  Any review, retransmission, dissemination or other use of, or 
taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited.   If you 
received this in error, please contact the sender and delete the material 
from any computer.


More information about the Valentina mailing list