db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Newsham" <jnews...@referentia.com>
Subject RE: Any ETA on "truncate table" ?
Date Wed, 20 Feb 2008 17:34:37 GMT

Does anyone have insight into how the "import" would compare to the
"drop/recreate" workaround, performance-wise?  I'm currently using
drop/recreate for a large number of tables, so just wondering if it would be
worth trying import.

Regarding holding up the truncate feature because of lack of standards, an
interim solution could be to use a system procedure similar to the way
import is implemented.  I realize that's not the only thing holding up the
feature... it also needs a volunteer. ;)


> -----Original Message-----
> From: fancellu [mailto:dino@felstar.com]
> Sent: Tuesday, February 19, 2008 11:57 PM
> To: derby-user@db.apache.org
> Subject: Re: Any ETA on "truncate table" ?
> Unfortunately I don't have the free time to help the project, I have
> enough
> of my own fish to fry.
> However, as a work around, I've found it much quicker to simply drop the
> table and then recreate it with the same name.
> e.g.
>         Statement stat=conn.createStatement();
>         stat.executeUpdate("DROP TABLE PKS");
>         stat.executeUpdate("CREATE TABLE PKS ( PK varchar(32) PRIMARY KEY
> NOT NULL )" );
>         conn.commit();
> --
> View this message in context: http://www.nabble.com/Any-ETA-on-
> %22truncate-table%22---tp15562346p15585747.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message