So I implemented a cluster to optimize one of my queries and it seems to of slowed it down by 3 times its original speed with no optomization.
Here is the query:
Here is the cluster creating code:
Without optomization I was getting a elapsed time (looking at the trace results) of 0.60. After implementing just indexes (for one example, I did CREATE INDEX id_customer ON CUSTOMER2(custid);) it brought my elapsed time from 0.60 to 0.54 after multiple tests.
So the next step was clusters, yet after following trace results I am now getting 1.50.
I think it has something to do with the way I am setting the size, however I am very new to this so I am unable to spot what I am doing wrong.
Thank you for any help!
posted 1 week ago
The query might not make much sense, but the goal was to make a sub nested unoptimized query so that we can see how much of a difference each optimization makes.