Subject | Re: [firebird-support] Firebird performace |
---|---|
Author | Ann W. Harrison |
Post date | 2005-02-09T18:21:13Z |
Christian Andersen wrote:
create view foobar as
select t.* from t_foobar t
join user_credentials u on u.credentials = t.credentials
where u.user_id = current_user
is the best. In theory, the optimizer should integrate the view
selection criteria with the criteria from the outer query... as long as
the view doesn't include aggregates, groups, etc.
Regards,
Ann
>Have you considered a view like this - which will perform better in Firebird
>
> Firebird performance issues.
> The reason we need the views is that we have row level security. We do
> this by having views like this.
>
> create view foobar as
> select *
> from t_foobar
> where credentials in (select credentials
> from user_credientials
> where user_credientials.user_id = current_user);
create view foobar as
select t.* from t_foobar t
join user_credentials u on u.credentials = t.credentials
where u.user_id = current_user
>For the web view, probably the stored procedure approach Adam suggested
is the best. In theory, the optimizer should integrate the view
selection criteria with the criteria from the outer query... as long as
the view doesn't include aggregates, groups, etc.
Regards,
Ann