Subject | Re: Slow View |
---|---|
Author | svein_erling |
Post date | 2002-08-16T16:58:36Z |
Craig,
is your query actually
select * from view where regno like 'P35%'
or
select * from view where regno like :param
The first of these allow for using indexes, whereas the second does
not. If you use parameters with values like the one you've written
above, try changing to
select * from view where regno starting :param
(and drop the %)
which always allow indexes since it is implied that the unknown part
is at the end.
If this is not the case we probably need more information (I assume
that when you say you brought it down and back up again that you
meant you did a backup and restore).
HTH,
Set
-just relaxing reading yahoogroups during my weekend
is your query actually
select * from view where regno like 'P35%'
or
select * from view where regno like :param
The first of these allow for using indexes, whereas the second does
not. If you use parameters with values like the one you've written
above, try changing to
select * from view where regno starting :param
(and drop the %)
which always allow indexes since it is implied that the unknown part
is at the end.
If this is not the case we probably need more information (I assume
that when you say you brought it down and back up again that you
meant you did a backup and restore).
HTH,
Set
-just relaxing reading yahoogroups during my weekend