Subject Re: Pros/Cons of StoredProc and DSQL
Author Adam
--- In firebird-support@yahoogroups.com, "ygboro" <newsb@...> wrote:
>
> Please, what to use to collect related data from several tables into a
> dataset component in a client application ? Possibilities I can see are
> 1 either use a dataset component with DSQL select statement and add
> lookup fields to a dataset object for data from related tables,

Slow and inefficient.

> 2 or use DSQL select with join(s) to get resulting rowset with all
> needed columns at once

Much better

> 3 or is it better to use selectable stored procedure or view which
> join the tables and give the resulting rowset ?

In theory, there is no difference between a view and a select, the
optimiser can do just as well with both.

Stored procedures are mainly useful if you need to control exactly how
you wish to loop through the different tables, or if you need to
manipulate specific fields (probably not this case).

I would use either a join or a view.

Adam