RE: a little help with query.
Posted in 2009
Silly question... What's the data type of the profile_token?
Is it really a Serial column?
Date: Mon, 6 Jul 2009 09:32:25 -0500
Subject: a little help with query.
From: floyd@fwellers.com
To: informix-list@iiug.org
The below query takes a long time the first time running because it must go to disk. But it takes like 50 seconds !!
the table has 94 million very wide rows. It is fragmented by a char column ( but not the column in the query ).
Given the below sqexplain output, is there anything obvious that can be done to speed it up ? Does the slowness have to do with the 'not null" clause ?
Thanks,
Floyd
=============SQEXPLAIN OUTPUT HERE =========================
select count (distinct varchar_column ) from table where varchar_column is not null and profile_token = 1234
Estimated Cost: 4104
Estimated # of Rows Returned: 1
1) owner.table: INDEX PATH
Filters: owner.table.varchar_column IS NOT NULL
(1) Index Keys: profile_token varchar_column (Serial, fragments: ALL)
Lower Index Filter: owner.table
.profile_token = 1234
====================END SQEXPLAIN OUTPUT===================
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009