Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-11 Thread Simon Slavin

On 11 Dec 2010, at 8:18am, Vander Clock Stephane wrote:

> I know this trick, but it's a little longer to do than simply manually 
> increate the file DB size ?
> my test show it's work, i m just currious why we can not do like this ?

Fragmentation does not make much difference in any operating system except 
Windows.  Even under Windows, the actual speed improvement you get from 
defragmentation only lasts until the file gets a little fragmented again, which 
is usually not long.

Try your file with and without fragments and see what actual time improvement 
you get.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-11 Thread Vander Clock Stephane
I know this trick, but it's a little longer to do than simply manually 
increate the file DB size ?
my test show it's work, i m just currious why we can not do like this ?

thanks again
stéphane

On 12/11/2010 3:44 AM, Max Vlasov wrote:
> On Sat, Dec 11, 2010 at 1:52 AM, Vander Clock Stephane<
> svandercl...@yahoo.fr>  wrote:
>
>> yes, i agree except that the file fragmentation of the file database
>> cause also the file fragmentation of some other files... that is logique
>> when more than 2 file grow a little at a time ! and the other file need
>> absolutely to not be fragmented !
>>
>>
> Ok then, if you feel you need this, there's a trick for db expanding. Create
> something big, like a table filled with random or uniform data and then
> delete it, you will get a database file with plenty of free space.
>
> Max
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Max Vlasov
On Sat, Dec 11, 2010 at 1:52 AM, Vander Clock Stephane <
svandercl...@yahoo.fr> wrote:

> yes, i agree except that the file fragmentation of the file database
> cause also the file fragmentation of some other files... that is logique
> when more than 2 file grow a little at a time ! and the other file need
> absolutely to not be fragmented !
>
>
Ok then, if you feel you need this, there's a trick for db expanding. Create
something big, like a table filled with random or uniform data and then
delete it, you will get a database file with plenty of free space.

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Vander Clock Stephane
yes, i agree except that the file fragmentation of the file database 
cause also the file fragmentation of some other files... that is logique 
when more than 2 file grow a little at a time ! and the other file need 
absolutely to not be fragmented !

On 12/11/2010 12:07 AM, Max Vlasov wrote:
> On Fri, Dec 10, 2010 at 11:20 PM, Vander Clock Stephane<
> svandercl...@yahoo.fr>  wrote:
>
>> Hello,
>>
>> to limit the file fragmentation i want to increase the size of the
>> database file (with the windows API function).
>>
>> Can i do this ?
>>
>>
> Vander, my tests show that the internal sqlite fragmentation affects more
> than the file system fragmentation. This is because when data placed
> naturally, the os predicts the data flow together with the client using the
> data, for internally fragmented db it's different, read this discussion
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg56083.html (I gave a
> linke to my post since root message doesn't contain the full discussion for
> some reasons). So, VACUUM from time to time is better overall than Os defrag
> (imho)
>
> Max Vlasov
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Vander Clock Stephane
but i try and it's seam to work ?

i simply increase manually the size of the database and it's seam to 
work ???
can you confirm that it's not possible because here it's work ?

> Wait until your data file is large enough, then use any OS tool to
> defragment it :)

that a big mistake, because the windows defragmenter is not very strong, 
for exemple
it's simply skip all file > 64 mb !
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Max Vlasov
On Fri, Dec 10, 2010 at 11:20 PM, Vander Clock Stephane <
svandercl...@yahoo.fr> wrote:

> Hello,
>
> to limit the file fragmentation i want to increase the size of the
> database file (with the windows API function).
>
> Can i do this ?
>
>

Vander, my tests show that the internal sqlite fragmentation affects more
than the file system fragmentation. This is because when data placed
naturally, the os predicts the data flow together with the client using the
data, for internally fragmented db it's different, read this discussion
http://www.mail-archive.com/sqlite-users@sqlite.org/msg56083.html (I gave a
linke to my post since root message doesn't contain the full discussion for
some reasons). So, VACUUM from time to time is better overall than Os defrag
(imho)

Max Vlasov
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Scott Hess
On Fri, Dec 10, 2010 at 12:20 PM, Vander Clock Stephane
 wrote:
> to limit the file fragmentation i want to increase the size of the
> database file (with the windows API function).

Consider http://www.sqlite.org/c3ref/c_fcntl_chunk_size.html .

-scott
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Dagdamor
Vander Clock Stephane  писал(а) в своём письме Sat,  
11 Dec 2010 02:20:42 +0600:

> Hello,
>
> to limit the file fragmentation i want to increase the size of the
> database file (with the windows API function).
>
> Can i do this ?
>
> thanks you by advance
> stéphane

Not possible, I'm afraid. Besides, SQLite reads the data in random order
(especially if the data is indexed) anyway, so defragmenting it won't help  
much.
Wait until your data file is large enough, then use any OS tool to  
defragment it :)
But be prepared that inner contents of the data file will be still  
fragmented.

-- 
Regards,
Serge Igitov
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Increase the datafile file size to limit the file fragmentation

2010-12-10 Thread Vander Clock Stephane
Hello,

to limit the file fragmentation i want to increase the size of the 
database file (with the windows API function).

Can i do this ?

thanks you by advance
stéphane
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users