ayladilara
Programmer
Hi all DB2 experts!
I have a question for you regarding db2 performance! We have got a table on which there are 20 milion records. When I query the table with the following script
" SELECT DISTINCT COL1,COL2,COL3 FROM MYTABLE WHERE STOREID=12345 " it takes nearly three min. to get the result.
My question : Is this normal for db2 engine? If no, what can be done to optimaze the query?
I know the fact that the queries with DISTINCT are expensive business.
Thanks in Advance!
I have a question for you regarding db2 performance! We have got a table on which there are 20 milion records. When I query the table with the following script
" SELECT DISTINCT COL1,COL2,COL3 FROM MYTABLE WHERE STOREID=12345 " it takes nearly three min. to get the result.
My question : Is this normal for db2 engine? If no, what can be done to optimaze the query?
I know the fact that the queries with DISTINCT are expensive business.
Thanks in Advance!