![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a table (Table1) which consists of one field..a CHAR(254). I append several million records(sdf). The first line in a set starts with a key number. Info is taken from that line by substrings and inserted into TABLE2. The next 3-5 lines in the scan all have info about that key number. After all loaded, a scan goes through and depending on the info in that line, decides what kind of info it is, puts it in a variable through use of substring, and after filling all the variables, replaces the fields in TABLE2 with those variables where keynum = value. This process is running incredibly slow. I've tried: update TABLE2 set field1=var1, field=var2 where keynum = keyvar and also replace field1 with var1 etc for keynum =keyvar. I get the correct results, but running on a 3.2 Gig processor with 1 Gig ram, it still crawls. After loading Table1, I create an index on the KEYNUM field (index on keynum to i_keynum)which I thought would help the speed, but no. Is there an advantage to creating an index on the character string in Table1? Since I'm doing a scan and searching for substrings in each line, I didn't see where it would help, but I'll never get through 12 million records this way (not all at once). Any ideas would help! Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |