Hichanged the clustered index from id column to this index, execution time came down further to about 50 seconds now.
I have a table called lead, which have about 500 thousand records and we need the following query to get executed.
SELECT skip 300000 first 75 * FROM lead WHERE ((enrollment_period IS NULL) OR (enrollment_period IN ('FT2015','F16','SUM2016','FALL2016','FALL2017','SP17'))) ORDER BY created_on DESC
The table lead has id column as the primary key and thus have clustered index in that column. This query is taking about 12 - 13 mins. When I added a non-clustered index on created_on and enrollment_period columns, it came down to 4 - 5 mins. Then I
Is there any other optimization scope available for this query? Overall, is there any other change that can be done so that the query will execute faster?
Thanks in Advance,
Manohar
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://members.iiug.org/mailman/listinfo/informix-list
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 483 |
Nodes: | 16 (2 / 14) |
Uptime: | 196:43:51 |
Calls: | 9,601 |
Calls today: | 2 |
Files: | 13,682 |
Messages: | 6,152,226 |