--- Scott Hess <[EMAIL PROTECTED]> wrote:
> Recently, various incremental vacuum features have been added, so you can do:
>
> -- Turn on incremental vacuum.
> PRAGMA auto_vacuum = incremental;
>
> -- Release 100 pages from the freelist, or all if there are fewer.
> PRAGMA incremental_vacuum(100);
Wouldn't it be more useful if specify the number of pages that
incremental_vacuum should _keep_ rather than release?
This way you would not care how many free pages there are.
>
> -- Return the number of items on the freelist.
> PRAGMA freelist_count;
>
> Based on this, I find myself wondering if there could be something like:
>
> -- Vacuum up 10% of the freelist when it exceeds 20% of the total space.
> PRAGMA auto_vacuum = incremental(20, 10);
>
> The basic goal would be to leave some slack in the system so that free
> pages can be allocated nearby to related pages, but kick in with some
> cleanup when the amount of unused space exceeds a threshold. A
> secondary goal is to not get too tied up with freelist-clearing - in
> the above, if half the pages were releases, then it would take four or
> five transactions to get the freelist back under control.
I like this idea. Maybe some sort of hint to have sqlite prefer to retain
free pages near certain tables or indexes would be useful.
>
> One could do this manually if there were a PRAGMA returning the total
> number of pages. Just wondering if there are plans to make it
> automagic.
>
> Thanks,
> scott
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------