DBunit performance - Here is my code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DBunit performance - Here is my code

amir asaraf
Hi,
 
Can you see any problematic usage of the dbunit infrastructure.
because of using a DatabaseSequenceFilter in order to avoid constraints issues,
we are not able to call TRUNCATE operation (we get constraints violation error), therefore we use CLEAN_INSERT.
 
Best regards,
Amir.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

DBAdaptor.java (5K) Download Attachment
DBConnection.java (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: DBunit performance - Here is my code

Matthias Gommeringer
Hi Amir,

from a dbunit point of view you might want to do the following to improve performance:
- Specify a schema name in your dbunit DatabaseConnection (see constructor DatabaseConnection(java.sql.Connection connection, java.lang.String schema) )
- If possible/sensible specify the tables you want to export and use method DatabaseConnection.createTable(String tableName)


Additionally you can try to wrap the FileOutputStream by a BufferedOutputStream which should definitely improve performance:

FlatXmlDataSet.write(fullDataSet, new BufferedOutputStream(new FileOutputStream(...)))

HTH,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "amir asaraf" <[hidden email]>
> Gesendet: 25.05.09 09:20:21
> An: [hidden email]
> Betreff: [dbunit-user] DBunit performance - Here is my code


> Hi,
>
> Can you see any problematic usage of the dbunit infrastructure.
> because of using a DatabaseSequenceFilter in order to avoid
> constraints issues,
> we are not able to call TRUNCATE operation (we get constraints
> violation error), therefore we use CLEAN_INSERT.
>
> Best regards,
> Amir.-----------------------------------------------------------------
> ------------- Register Now for Creativity and Technology (CaT), June
> 3rd, NYC. CaT is a gathering of tech-side developers & brand
> creativity professionals. Meet the minds behind Google Creative Lab,
> Visual Complexity, Processing, & iPhoneDevCamp asthey present
> alongside digital heavyweights like Barbarian Group, R/GA, & Big
> Spaceship. http://www.creativitycat.com ______________________________
> _________________ dbunit-user mailing list dbunit-user@lists.
> sourceforge.net https://lists.sourceforge.net/lists/listinfo/dbunit-
>
> user


____________________________________________________________
Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://produkte.web.de/go/04/


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: DBunit performance - Here is my code

Karl Jóhann Pálsson

This might be a bit of a long shot, but you don't have any logging turned on for dbunit do you?

My db dumps went from, "I'm not waiting for this any longer" to "oh look, it's done already"

I think I set it to WARN or higher only.

Cheers,
Karl P

-----Original Message-----
From: Matthias Gommeringer [mailto:[hidden email]]
Sent: Tuesday, May 26, 2009 9:11 PM
To: [hidden email]
Subject: Re: [dbunit-user] DBunit performance - Here is my code

Hi Amir,

from a dbunit point of view you might want to do the following to improve performance:
- Specify a schema name in your dbunit DatabaseConnection (see constructor DatabaseConnection(java.sql.Connection connection, java.lang.String schema) )
- If possible/sensible specify the tables you want to export and use method DatabaseConnection.createTable(String tableName)


Additionally you can try to wrap the FileOutputStream by a BufferedOutputStream which should definitely improve performance:

FlatXmlDataSet.write(fullDataSet, new BufferedOutputStream(new FileOutputStream(...)))

HTH,
matthias

> -----Ursprüngliche Nachricht-----
> Von: "amir asaraf" <[hidden email]>
> Gesendet: 25.05.09 09:20:21
> An: [hidden email]
> Betreff: [dbunit-user] DBunit performance - Here is my code


> Hi,
>
> Can you see any problematic usage of the dbunit infrastructure.
> because of using a DatabaseSequenceFilter in order to avoid
> constraints issues,
> we are not able to call TRUNCATE operation (we get constraints
> violation error), therefore we use CLEAN_INSERT.
>
> Best regards,
> Amir.-----------------------------------------------------------------
> ------------- Register Now for Creativity and Technology (CaT), June
> 3rd, NYC. CaT is a gathering of tech-side developers & brand
> creativity professionals. Meet the minds behind Google Creative Lab,
> Visual Complexity, Processing, & iPhoneDevCamp asthey present
> alongside digital heavyweights like Barbarian Group, R/GA, & Big
> Spaceship. http://www.creativitycat.com ______________________________
> _________________ dbunit-user mailing list dbunit-user@lists.
> sourceforge.net https://lists.sourceforge.net/lists/listinfo/dbunit-
>
> user


____________________________________________________________
Text: GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://produkte.web.de/go/04/


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: DBunit performance - Here is my code

amir asaraf
Hi,
 
How can I modify the DBUnit logging policy?
 
Regards,
Amir.

2009/5/27 Karl Jóhann Pálsson <[hidden email]>

This might be a bit of a long shot, but you don't have any logging turned on for dbunit do you?

My db dumps went from, "I'm not waiting for this any longer" to "oh look, it's done already"

I think I set it to WARN or higher only.

Cheers,
Karl P
 


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user