Hi Shahbaz, On 01-07-2012 12:22:02 -0400, Shahbaz wrote:
[select sum(date), sum(time), count(ticker) from trades where date = 20120501 and time > 34200000 and time < 37800000;]
This query took 1 minute and 15 seconds! The second time I ran it, it took 1 minute and 11 seconds. Notice that count(ticker) in this query only returned 5,969,337. This query is essentially the same as the previous one, but now I am only looking to process trades between 9:30 am and 10:30 am. So this query processes 1 hours' worth of trades while previous queries process the whole day.
I cannot give any hints here, but this feels like a bug somehow. Could you open a bug for this on our bugtracker (bugs.monetdb.org), and attach the output of your fast and slow query when prefixed with "EXPLAIN"? Thanks, Fabian