SELECT takes too long
Posted in 1996
We have two tables, coverage table with 25000 records and plan table
with 2000 records. Every night, we DELETE and ADD about 40% of
records to coverage table. Also, perform update statistics.
When I run sql command, it only takes 1 seconds to get a count. But
next day, I ran the same sql command and it was taking over 50
seconds.
select count(*)
from coverage, plan
where coverage.ssn = "123-12-1234"
and coverage.dep_no = 0
and coverage.plan_id = plan.plan_id
and plan.plan_type = "M"
The updating statistics on both coverage and plan tables has no
effect. But when I DROP and Re-created coverage table, I was able to
get faster respond.
Does anyone know why dropping and re-creating table restores responds
time?
We are using On-line 5.01.
Thanks
Susik