4 Replies Latest reply on Oct 7, 2013 8:34 AM by David Miller

    Database insert performance MC55A0 (WM6.5)

    David Miller

      Hi

       

      I have been trying for several days to increase database insert performance on the device (MC55A0).  But to no avail.  This is what I am doing presently as a simple test...

       

          db = ::Rho::RHO.get_src_db(@ItemData)

          db.start_transaction

          begin     

            row_cnt = 0

            while row_cnt < 1000

              insert_data = {

                    :item_no => "9999",

                    :item_description1 => "9999",

                    :item_description2 => "9999"

                  }

       

                  itemRow = ItemData.create(insert_data)

                  row_cnt = row_cnt + 1

            end

            db.commit

          rescue

            db.rollback

          end


      Using the above I am getting 8 inserts per second on the device, into a FixedSchema database.  This is not going to get signed off.  I actually need around 400 inserts per second.


      I've tried everything I can think of to increase performance but nothing seems to make it better.  No errors reported in rholog.txt, even with MinSeverity = 0.


      I know I can copy a sqlite.db from a server to the device but this is an 'in application' process and as such inserts need to be done on the device and in a controller.


      Has anyone got similar experiences on device?  Or better still, has anyone got a solution to the performance issue I am suffering?


      Yours

      David