thanks Thomas. I have tried the first one and it works.
On Oct 24, 3:52 am, "Thomas Mueller" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> > thanks for the reply. but i need to append to the table and not to
> > create it. is there anything i can do?
>
> Yes, there are some workarounds:
>
> - Use SET UNDO LOG 0 before the insert, and SET UNDO LOG 1 afterwards.
> See alsohttp://www.h2database.com/html/grammar.html#setundolog- this
> option is a bit dangerous because rollback is not possible
>
> - Use SET MAX_MEMORY_UNDO to limits the amount of memory for undo
> operations. Seehttp://www.h2database.com/html/grammar.html#setmaxmemoryundo
>
> - Use CREATE TABLE AS SELECT to create a new table, then use multiple
> INSERT INTO SELECT to insert the rows one block at a time to the real
> table.
>
> The best solution would be if it just worked - without having to use
> those workarounds. This feature is already on the roadmap with
> priority 1: "Support large updates (use the transaction log to undo)."
> - but I don't know when it will be implemented.
>
> Regards,
> Thomas
>
>
>
> > On Oct 23, 8:06 am, "Thomas Mueller" <[EMAIL PROTECTED]>
> > wrote:
> >> Hi,
>
> >> A solution is to use
>
> >> CREATE TABLE Contents(c1 SMALLINT, id SMALLINT, Bid SMALLINT, Seq
> >> SMALLINT, off
> >> VARCHAR(10), Duration VARCHAR(10), Line VARCHAR(10000))
> >> AS SELECT * FROM CSVREAD...
>
> >> Regards,
> >> Thomas
>
> >> On Wed, Oct 22, 2008 at 7:16 PM, ebrahim <[EMAIL PROTECTED]> wrote:
>
> >> > Hi,
>
> >> > I have this table:
>
> >> > Contents(c1 SMALLINT, id SMALLINT, Bid SMALLINT, Seq SMALLINT, off
> >> > VARCHAR(10), Duration VARCHAR(10), Line VARCHAR(10000))
>
> >> > and I have indexes on: c1, Bid, Seq
> >> > # rows = 135000
>
> >> > I'm using to import to the db:
> >> > INSERT INTO Contents SELECT * FROM CSVREAD ...
>
> >> > csv file is 45MB
>
> >> > it throws outofmemory exception. it works if i increase the heap (-
> >> > Xmx128m) but i don't want this
>
> >> > Any hint/tune on how to avoid this.
>
> >> > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---