Board index » delphi » View vs. Stored Procedure

View vs. Stored Procedure

Hi,

I am wondering if for a complex sql query is more efficient to use a View or
a Stored Procedure.

TIA

Stefano

 

Re:View vs. Stored Procedure


Stefano,

You will be better of creating a VIEW if:

1) No parameters are needed in any way
2) No ORDERing of one or more colums are required

If at least one of the characteristics are needed you will be
much better of with a SELECT stored procedure. An EXECUTE stored
procedure on the other way is not appropriate, because it can't
return multiple rows.

Cheers,
Tom

Re:View vs. Stored Procedure


"Tom" <t.vl...@hccnet.nl> ha scritto nel messaggio
news:3d6dd80e$1@newsgroups.borland.com...

Quote

> Stefano,

> You will be better of creating a VIEW if:

> 1) No parameters are needed in any way
> 2) No ORDERing of one or more colums are required

> If at least one of the characteristics are needed you will be
> much better of with a SELECT stored procedure. An EXECUTE stored
> procedure on the other way is not appropriate, because it can't
> return multiple rows.

Of course

Quote

> Cheers,
> Tom

Thanks again.

Stefano

Other Threads