Subject Re: Query optimization
Author Ali Gökçen

here is some more suggestions for you and newbies who interested.

If MSISDN field is full-numeric(=not alphanumeric) then you should
use INTEGER instead of varchar(9). string fields need more bytes and
clockcycles for operations, increases costs, decreases performances.
then you can use "where MSISDN between 600000000 and 699999999".

Don't create any duplicate index, use unique compound index instead
of it. MSISDN+INTERACT_ID for example.
(not INTERACT_ID+MSISDN!; should be poors first).
create index on fields if you using them in where clause to search.

And, read documents about FB from



--- In, "Diego Rodriguez"
<drodriguez@a...> wrote:
> Hi,
> Many thanks for your help. The query that took 3 hours now runs
on 10
> seconds. It was very useful your hint about indexes in the PLAN,
because as
> only appeared one index, I didn't understand the use of declaring
more than
> one index in a table. Adding one more index has improved all
queries, not
> only this one, about 25%
> I have one more question about indexes, but I will start a new
> because is not exactly related to this query
> Diego