Skip to Content
avatar image
Former Member

ISQL import data by running insert query, speed is slow.

I have more than 2 million row of data needed to be insert into Sybase IQ in ISQL. The speed is slow, what is other way to insert the data except by using insert statement by open a file?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 18, 2014 at 08:20 PM

    The fastest way to import data into IQ is via the 'LOAD TABLE ...' command. see the reference doc for the syntax.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      set temporary option date_order='ymd'

      go

      set temporary option date_format='YYYY-MM-DD'

      go

      set option public.MINIMIZE_STORAGE = 'ON';

      truncate table EventDemo.fact_actual;

      commit;

      load table EventDemo.fact_actual(

      period_date,

      product_code,

      channel_code,

      actual_amt,

      actual_qty,

      actual_cogs

      )

      from 'C:\Users\DELL\Desktop\fact_actual_test2.csv'

      quotes off

      escapes off

      format BCP

      delimited by '|'

      row delimited by '\n'

      ;

      commit

      ;

      rollback

      ;

      Thank for your reply, found out this script in instruction lesson 2.