Subject | RE: [Firebird-Architect] RFC: Proposal for the implementation |
---|---|
Author | Samofatov, Nickolay |
Post date | 2004-11-29T19:11:35Z |
Vlad,
For me either, but to making it useful is not that simple.
For example on Windows creating temporary files is horrifyingly slow and
also tends to fragment the filesystem, you can see this with on-disk
sorting module.
One big temporary space storage has better performance properties, but
it needs management and is not much better than normal database in that
regard.
Also, collapsing per-attachment temporary space is going to introduce
difficult issues which are going to translate to bad performance.
Imagine you create a temporary blob, which is the normal way you go to
assign values to blob fields.
When you create it you don't know which table it is going to be attached
to. You may pass blob to view or stored procedure and don't know the
destination table at all. What tablespace should engine use to store
this blob?
revamped and also would require special threatment of temporary tables
in GC and sweep handlers.
the picture significantly.
They are not going to be slower than normal tables and we'll have
motivation to optimize normal access paths, not one special case of
temporary tables.
BTW, note that due to multiple transactions allowed for one connection
update conflicts are possible for temporary tables and the most of the
versioning, conflict resolution and GC logic of CCH, DPM and VIO modules
still applies.
time.
We are going to implement deferred constraints so this is not going to
change the big performance picture either.
database file and redirect writes to separate read-write storage. :-)
The benefit of my approach is that it would allow to share 99% of
implementation with normal tables motivating us to optimize caching
logic, data placement logic and access paths for entire engine, not only
for temporary tables.
> Separate page space seems most attractively from performance POV forme.
For me either, but to making it useful is not that simple.
For example on Windows creating temporary files is horrifyingly slow and
also tends to fragment the filesystem, you can see this with on-disk
sorting module.
One big temporary space storage has better performance properties, but
it needs management and is not much better than normal database in that
regard.
Also, collapsing per-attachment temporary space is going to introduce
difficult issues which are going to translate to bad performance.
Imagine you create a temporary blob, which is the normal way you go to
assign values to blob fields.
When you create it you don't know which table it is going to be attached
to. You may pass blob to view or stored procedure and don't know the
destination table at all. What tablespace should engine use to store
this blob?
> > 2) Nickolay's ATTACHMENT_ID idea to add a hidden column toYour approach is not easier, at least indices code would have to be
> both data
> > and indices and teach the optimizer to filter the rows.
>
> I think this is not so good. It's seems to be easy to
> implement, but i showed even more easiest way.
revamped and also would require special threatment of temporary tables
in GC and sweep handlers.
> But this has one big disadvantage - performance. Clean up at startupis
> fast but we don't want to reload engine just to empty tempWe do GC for normal tables anyways, temp tables are not going to change
> tables ;) Regular clean up (sweep, garbage collection) is
> slow for temp tables and must be avoided, imho.
the picture significantly.
They are not going to be slower than normal tables and we'll have
motivation to optimize normal access paths, not one special case of
temporary tables.
BTW, note that due to multiple transactions allowed for one connection
update conflicts are possible for temporary tables and the most of the
versioning, conflict resolution and GC logic of CCH, DPM and VIO modules
still applies.
> And i can't see how Nickolay idea satisfy tables with ONDo what's asked. Delete rows from temp table in DFW handler at commit
> COMMIT DELETE option.
time.
We are going to implement deferred constraints so this is not going to
change the big performance picture either.
> At last, different page space allows read-only databaseFor those special applications NBACKUP allows to have read-only main
> to work with temp data and still remains read-only - this can
> be important for some applications
database file and redirect writes to separate read-write storage. :-)
The benefit of my approach is that it would allow to share 99% of
implementation with normal tables motivating us to optimize caching
logic, data placement logic and access paths for entire engine, not only
for temporary tables.
> VladNickolay