Subject Select distinct slow
Author willfordkc
I have a very simple query

SELECT DISTINCT f_gender from t_framesdata

Plan
PLAN SORT ((T_FRAMESDATA NATURAL))

Adapted Plan
PLAN SORT ((T_FRAMESDATA NATURAL))

the table has 38 fields and 285520 rows
the first time i run the query it is very slow taking about 30 sec
the second time it takes about 1 sec

Is this because there were no connections and nothing was cached or
is there something else wrong?