Defrag time complexity

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

Defrag time complexity

Sergio Bossa
Hi,

I'm running a checkpoint defrag manually every 1 million row deletions, but I'm noticing the defrag takes more and more time as the database grows: so is it proportional to the size of the whole database, rather than the size of the "wasted space"?

Thanks,

Sergio B.

--
Sergio Bossa
http://www.linkedin.com/in/sergiob

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: Defrag time complexity

Fred Toussi-2
Defrag time is theoretically proportional to the size of the data left in the database. This is the size of the database after defrag. For example, if you delete 90% of the rows in a large database, defrag time should be proportional to the size of the 10% remaining.
 
But as the OS disk buffering and hard disk seek time have an effect on reading the data, you may also get longer times when the  pre-defrag size is larger.
 
 
Fred
 
On Thu, Apr 25, 2013, at 10:26, Sergio Bossa wrote:
Hi,
 
I'm running a checkpoint defrag manually every 1 million row deletions, but I'm noticing the defrag takes more and more time as the database grows: so is it proportional to the size of the whole database, rather than the size of the "wasted space"?
 
Thanks,
 
Sergio B.
 
--
Sergio Bossa
http://www.linkedin.com/in/sergiob
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Hsqldb-user mailing list
 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user