Subject | Re: Optimizing a query |
---|---|
Author | Myles Wakeham |
Post date | 2006-11-28T16:14:52Z |
> no - you need to pass the paging parameters into the procedureAh! That's interesting. Unfortunately something I wasn't aware of (until
> and let the
> queries in the procedure handle this paging. Don't use FIRST
> skip on a
> proceure output since you will be processing all records the
> most expensive
> way everytime you call it. I have used it sometimes but only
> when performace
> is acceptable and therefore only on small tables with
> inexpensive queries -
> (and when I'm feeling really lazy)
now). I can do that, but I have to restructure the entire PHP class that
I'm using for Page display (I'm using EZResults for this, with EZSql as the
DB class). They have a simple way (based on how MySQL does this) to show a
page of data, handle next/previous, first/last, etc. But of course it
doesn't take into consideration the way that Firebird works for this.
So if I understand you correctly, rather than using FIRST x SKIP y in the
query that is used to call the stored procedure, I should use this technique
but only INSIDE the stored procedure. Is that correct and the most optimal
way to do this?
Regards,
Myles
===============================
Myles Wakeham
Director of Engineering
Tech Solutions US, Inc.
Phone (480) 451-7440
www.techsol.org