RE: pl/sql question and owa_pattern question

2003-11-21 Thread Stephane Faroult
Guang, I agree with your analysis, looping on characters is not the faster you can do, simply because there is a significant overhead (compared to C code for instance) in a language such as PL/SQL - which might be perfectly acceptable in some circumstances, much less so in very repetitive

RE: pl/sql question and owa_pattern question

2003-11-21 Thread Guang Mei
Hi Stephane: Thanks for your good suggestion. I compared the method you suggested and the orginal one and it indeed boosted the performance (in my simple test). However the ONLY problem I am having is that by doing TRANSLATE, I lost the original delimits. The new method (you suggested)

RE: pl/sql question and owa_pattern question

2003-11-21 Thread Guang Mei
Perl is a good tool for text processing. But our program is already written in pl/sql long time ago and there are intensive db calls in this pl/sql program. (text processing is only part of it). So I can not change that. BTW I did a comparison study a while ago for some of our pl/sql packages

RE: pl/sql question and owa_pattern question

2003-11-21 Thread Jamadagni, Rajendra
Guang, Well you are almost there ... you need fifo structure namely a pl/sql array 1. create a local pl/sql array to store the delimiter (store the ascii value of the delimiter to be safe) my_array (varchar2(5)) 2. as you find a delimiter insert into the first position in the array and

Re: pl/sql question and owa_pattern question

2003-11-21 Thread Mladen Gogala
PL/SQL is the fastest thing of them all when it comes to executing SQL commands, but there are things which simply aren't practical in 9.2 PL/SQL. Regular expression processing is one of those things. Fortunately, you can mix the two. Without DBI, perl scripts simply woudn't be very useful. Of

Re: pl/sql question and owa_pattern question

2003-11-21 Thread Daniel Hanks
Would extproc_perl fit well enough, though, until 10g is here? On Fri, 21 Nov 2003, Mladen Gogala wrote: PL/SQL is the fastest thing of them all when it comes to executing SQL commands, but there are things which simply aren't practical in 9.2 PL/SQL. Regular expression processing is one of

pl/sql question and owa_pattern question

2003-11-20 Thread Guang Mei
Hi: In my pl/sql program, I want to process each word in a string. The string is selected from a varchar2(300) column. The delimit that separates the words is not necessary space character. The definition of the delimit in this program is set as 1. Any character that is NOT AlphaNumerical (0-9,

Re: pl/sql question and owa_pattern question

2003-11-20 Thread Mladen Gogala
I don't know about PL/SQL but here is how I would get separate words from a big string: #!/usr/bin/perl -w use strict; my (@ARR); while () { chomp; @ARR = split(/[^0-9a-zA-Z_\.,]/); foreach (@ARR) { print $_\n; } } There is something called DBI and it can be used to