Subject | Re: [Firebird-Architect] RFC: Cross database queries |
---|---|
Author | Vlad Horsun |
Post date | 2007-08-01T17:51:25Z |
> > PROVIDER <provider_name>: string - identifier of plugin realizing work with an externalThis was my intent ;) Perhaps badly formulated
> > data source. Most likely - a name of dll, by analogy with UDF
> >
> Not agree on this.
>
> Should be better to use a logical provider name, mapped to a physical
> file through configuration, as fbintl.conf do.
> > 4. Heterogeneous queries to external data sourceOk
> >
> > Table qualifier: <ds_table_name>@<ds_name>
> >
> @ is special symbol in ADO.NET meaning parameter, but I don't expect
> problem here, as Oracle uses same syntax.
> > It is necessary to teach parser and optimizer to cut from heterogeneous query such partsYes
> > which may be sent to an external engine. Also it is necessary to demand ours SQL syntax and to
> > decide where to handle built-in functions and aggregates. Not clear how to handle joins of local
> > and external tables - to put the external table at outmost place (and fetch all rows, but only
> > once) or to put it at inner place (and to execute set of parametrized queries on external data
> > source for every row fetched from local table)
> >
> Will the FB provider be a totally external provider?
> Can't it be made in a way that cross queries between FB databases inI doubt it possible without serious work on engine internals. If we make exportable all
> same engine are handled most like single DB queries?
info needed to our optimizer we'll reach near the same performance level, i think
> > Separate question - EXECUTE STATEMENT not in PSQL block. In this case formats message's forBecause EXECUTE STATEMENT ... ON will pass query string directly to remote SQL engine.
> > client can be defined only when the text of query is known, i.e. during call isc_dsql_prepare the
> > text of query should be known (may not be a parameter).
> >
> > For those who wants prepared reusable EXECUTE STATEMENT with parametrized text of query - will
> > wrap it up in PSQL, for example in EXECUTE BLOCK.
> > However for now EXECUTE STATEMENT may not be used outside of PSQL block ;)
> Why one would need EXECUTE STATEMENT outside PSQL block, instead of just
> prepare the SQL directly?
It will not make attempt to parse and understand potentially unknown syntax.
This is very close to Pavel's proposal about special kind of stored procedure (if i understand
him right) for this purpose.
Regards,
Vlad