1 2 3 Previous Next 33 Replies Latest reply: Feb 26, 2014 11:28 PM by 936666 Go to original post RSS
      • 30. Re: Java pl sql vs pl sql
        rp0428

        You already have you answer in those other threads you posted.

         

        Just write a simple Java program to peel off the number of bytes and convert the datatypes.

         

        It's really simple. Hard to believe you would rather spend weeks pursuing a PL/SQL solution when you have already been given the proper one.


        • 31. Re: Java pl sql vs pl sql
          Mike Kutz

          936666 wrote:

           

          Mike,

          I cant use EXTERNAL TABLEs since it is not saved in file or xml format, since it is not saved anywhere, it is one of the input in the stored procedure.



           

          Then use UTL_FILE to make it exist...

           

          However, I still don't understand why you are refusing to use INSERT at the application level.

          936666 wrote:

           

          The applications already has the data is some sort of Struct/Class with one element per row (ie "table").

          Why do you not force them to do INSERT?

           

          It is not one element per one row it is buch of junk characters(BLOB).

          It consists of  combination of multiple column and multiple rows

          eg 50columns +1000 rows as a single BLOB.

           

          That "eg 50columsn + 1000 rows" should be decipherable by the application...since the application created it.

          As such, the application should be calling "INSERT into t1 (col1, .... col50), ( :x1, ... :x50)"  1000 times... not "{ call myProcedure( :type, :blob ); }" 1x time.

          If done properly, the application should be able to INSERT 1M rows in <18s. (my benchmarks on a VM'd system running on 1 core @ 50% max processing power .. ie 0.5 cores)

          Compare this benchmark to your current method's best benchmark:  1k rows in 75s.

           

          By proof of benchmark, I will conclude with this final helpful statement to you in regards to this matter:

          You are doing it wrong!

           

          Sincerely,

           

          MK

          • 32. Re: Java pl sql vs pl sql
            936666

             

            That "eg 50columsn + 1000 rows" should be decipherable by the application...since the application created it.

            As such, the application should be calling "INSERT into t1 (col1, .... col50), ( :x1, ... :x50)"  1000 times... not "{ call myProcedure( :type, :blob ); }" 1x time.

             

            Mike,

            Thanks for ur time and replay.

            Why we are not using pl/sql code inside the application is,any one can change the code who is working on the application side, it is safe to keep as stored procedure so that only the pl/sql developer will be having to access the code.

            For some client it is 50 rows for some it 60 rows and so and so,to insert the data.I will redirect the input to corresponding stored procedure( from main stored procedure to sub stored procedure) based on the client.So it can not be done at the application level.

            Why can't the stored procedure be much effective in this case?

            • 33. Re: Java pl sql vs pl sql
              936666

              You mean to say that "Use java stored procedure".

              1 2 3 Previous Next