Cost is low but still query runs slow
Isn't the cost of a query directly related to the performance? This is what I have believed so far in my experience but lately I've been noticing that some queries even though their cost is very less (less than 100 and no full table scan), runs for like 90 mins to fetch 5k records. The same way I had a query which had a cost of around 125000 or more but ran in less than a minute. I am not able to understand this behavior. Whenever I had a performance problem with queries I've had a look at the explain