Subject | Re: [firebird-support] Return query from stored procedure |
---|---|
Author | Milan Babuskov |
Post date | 2008-03-07T13:15:33Z |
Sasa Mihajlovic wrote:
difference is only 20%, but then again 100k records isn't that much.
create procedure select_me ( some_type )
as
begin
for select * from table1 where type = some_type do suspend;
for select * from table2 where type = some_type do suspend;
for select * from table3 where type = some_type do suspend;
end
but you need to show us how your view really looks like and also what
plan do you get with and without view.
--
Milan Babuskov
http://www.flamerobin.org
> I have view with 100000 documets (records) diferent type. When I callThis is expected with Firebird 1.x. In fact, it's strange that
> select * from view where type = some_type firebird made full view and
> execute my sql statement. When I call sql statement without view just
> join tables and put where type = some_type I get 20% faster respones
> from database.
difference is only 20%, but then again 100k records isn't that much.
> So how to write SP which will return data like it is described inI assume your view has UNIONs, so I guess something like:
> secound sample (without calling view)
create procedure select_me ( some_type )
as
begin
for select * from table1 where type = some_type do suspend;
for select * from table2 where type = some_type do suspend;
for select * from table3 where type = some_type do suspend;
end
but you need to show us how your view really looks like and also what
plan do you get with and without view.
> or someone have a better ideaUse Firebird 2.x
> how to increase speed of my db response?
--
Milan Babuskov
http://www.flamerobin.org