> The database already knows exactly where to look for each table when all
the tables are in the same file.  
> All it has to do is "lseek()" to the appropriate spot.  How does moving
tables into separate files help this or make it any faster?
>

"Table partitioning" is a technique used to improve performance of large
databases running on large machines.
With table partitioning you can configure the DB so that it stores some
fields of a record in a file and the remaining fields of the same record in
a different file.
If each record is large, placing the two files on two different disks
usually speeds things up because reading (or writing) a record requires to
read, in parallel, half the record from one disk and the other half from the
other disk.
Performance also increases if your select happens to access only the fields
stored in one of the two files: if the select requires a sequential scan of
the entire (large) table, the DB manager will have to read through only half
the mount of data.
In my opinion however table partitioning is beyond the scope of a DB like
SQLite...

Bye




 -----Messaggio originale-----
Da:     [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Inviato:        martedì 21 marzo 2006 14.48
A:      [email protected]
Oggetto:        Re: [sqlite] support for table partitioning?

"Miha Vrhovnik" <[EMAIL PROTECTED]> wrote:
> On 3/21/2006, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> 
> >"Miha Vrhovnik" <[EMAIL PROTECTED]> wrote:
> >> Hi drh and others,
> >> 
> >> Regarding the issues they appear on ML with very large tables and
knowing
> >> that sqlite now enforces constraint checks on tables, is there any
> >> chances of  suporting table partitoning?
> >> 
> >
> >Put each table in a separate database file then ATTACH
> >the databases.
> >
> That's not the same. You still need to rewrite queries, where in real
> table partitioning you don't need to do that.

What changes to the queries do you think are necessary?

> The select's and inserts
> are faster because db knows where to put/search for them.
> 

The database already knows exactly where to look for each
table when all the tables are in the same file.  All it
has to do is "lseek()" to the appropriate spot.  How does
moving tables into separate files help this or make it any
faster?

--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to