 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Patrick Moloney Guest
|
Posted: Mon Feb 12, 2007 6:56 pm Post subject: Compare IBQuery and IBStoredProc |
|
|
I use primarily Interbase stored procedures. I'm reevaluating using
IBQuery vs IBStoredProc components to access these. I know how to use
each. But does anyone have any idea of the relative benefits or
performance of one versus the other? Is IBQuery smaller, simpler and
faster than IBStoredProc, as I suspect? Does it make much difference?
5% or 50%? Is it worth my time to consider this?
I've re-read the documentation a couple of times, but it's not clear to
say the least. There are a couple of statements where one is
"preferred", but it doesn't say why or by who. It describes each as
being able to do almost everything, complete with examples.
--
Patrick Moloney |
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Mon Feb 12, 2007 8:49 pm Post subject: Re: Compare IBQuery and IBStoredProc |
|
|
Patrick Moloney wrote:
| Quote: | Is IBQuery smaller, simpler and
faster than IBStoredProc, as I suspect? Does it make much difference?
5% or 50%? Is it worth my time to consider this?
|
I haven't profiled, but I suspect the performance will be close to
identical, at least in comparison to actually running the proc.
To me the question comes down to which interface you prefer as a
programmer.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Everything You Need to Know About InterBase Character Sets:
http://blogs.teamb.com/craigstuntz/articles/403.aspx |
|
| Back to top |
|
 |
Wayne Niddery [TeamB] Guest
|
Posted: Mon Feb 12, 2007 9:39 pm Post subject: Re: Compare IBQuery and IBStoredProc |
|
|
Patrick Moloney wrote:
| Quote: | I use primarily Interbase stored procedures. I'm reevaluating using
IBQuery vs IBStoredProc components to access these. I know how to use
each. But does anyone have any idea of the relative benefits or
performance of one versus the other? Is IBQuery smaller, simpler and
faster than IBStoredProc, as I suspect? Does it make much difference?
5% or 50%? Is it worth my time to consider this?
|
As Craig says, its doubtful there is any significant performance difference
between these two. The reason for using a query component over a TStoredProc
component for me is simply whether the stored proc is selectable or not
(returns a result *set*) - in which case I use a query component.
For myself, I never use TQuery though, I choose between TIBDataset and
TIBSQL. If you do not need to use data-aware controls linked to the result
set then TIBSQL has less overhead and should give you a little better
performance.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"We've all heard that a million monkeys banging on a million
typewriters will eventually reproduce the entire works of Shakespeare.
Now, thanks to the Internet, we know this is not true." - Robert
Wilensky |
|
| Back to top |
|
 |
Patrick Moloney Guest
|
Posted: Mon Feb 12, 2007 10:50 pm Post subject: Re: Compare IBQuery and IBStoredProc |
|
|
Thanks guys.
I've tried to keep as much of the code in the database as possible, so
we have a lot of stored procedures. My preference has been to use
TIBStoredProcs. Some people who have written some of the code preferred
IBQuerys, but sometimes I find code in there that I would rather have
in the server - or coded queries when we have a stored proc to get that
data. So, we don't see the dependency. I didn't think a user would be
able to tell the difference in performance, although I wondered about
size. I'm much more interested in how easily the code can be understood
and supported. I like the SP component because it doesn't add any code.
I never use TIBDataset, (thought it would be too virtual), or TIBSql,
which I've thought about. Just not clear on "linked data controls".
Even with Q or SP components I transfer the data in code, so I wouldn't
consider them linked.
About the only place I use Query components is on forms that return a
list of records to display.
I put something into QC this weekend about documentation on this in the
Developer Guide. Maybe that should just straight-forward describe how
to use each component and delete the unsupported comments about which
is "Preferred" for what - except maybe, as you said, personal
preference.
Thanks
--
Patrick Moloney |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|