Subject | RE: [firebird-support] Query runs extremely slow when run inside a stored procedure |
---|---|
Author | Paul Lopez |
Post date | 2011-03-15T01:47:02Z |
Hi Anderson,
Hi Paul,
Sorry, I don't get it... you say:
|
|The plans are very different at the beginning…
|
But then, the PLANS you've posted are the very same. Where's the difference?
Regards,
Anderson
Well, the tops were different and I’m not sure if that makes a difference to the overall performance.
I mean, the stand alone seems to use two plans and the stored proc seems to bundle it together. I haven’t figured out what this means, but there definitely is a massive difference in performance.
PLAN
(CAT_MBS_ITEM_MAP INDEX (CAT_MBS_ITEM_MAP_ELEMENT)
)
PLAN SORT
---
PLAN
(CAT_MBS_ITEM_MAP INDEX (CAT_MBS_ITEM_MAP_ELEMENT)
)
SORT
I have worked around this and ended up with a very well performing stored procedure, but I’m wondering why there was the difference, and there is a possibility that there are other areas that may be affected similarly. Even if there is a 2 second proc that could be a split second, the sum of all could be hurting performance.
[Non-text portions of this message have been removed]
Hi Paul,
Sorry, I don't get it... you say:
|
|The plans are very different at the beginning…
|
But then, the PLANS you've posted are the very same. Where's the difference?
Regards,
Anderson
Well, the tops were different and I’m not sure if that makes a difference to the overall performance.
I mean, the stand alone seems to use two plans and the stored proc seems to bundle it together. I haven’t figured out what this means, but there definitely is a massive difference in performance.
PLAN
(CAT_MBS_ITEM_MAP INDEX (CAT_MBS_ITEM_MAP_ELEMENT)
)
PLAN SORT
---
PLAN
(CAT_MBS_ITEM_MAP INDEX (CAT_MBS_ITEM_MAP_ELEMENT)
)
SORT
I have worked around this and ended up with a very well performing stored procedure, but I’m wondering why there was the difference, and there is a possibility that there are other areas that may be affected similarly. Even if there is a 2 second proc that could be a split second, the sum of all could be hurting performance.
[Non-text portions of this message have been removed]