Re: [PERFORM] Why is now()::date so much faster than current_date

2015-11-17 Thread David Rowley
On 17 November 2015 at 21:49, Thomas Kellerer wrote: > Hello, > > I stumbled over this answer: http://stackoverflow.com/a/9717125/330315 > and this sounded quite strange to me. > > So I ran this on my Windows laptop with Postgres 9.4.5, 64bit and indeed > now()::date is much

Re: [PERFORM] Why is now()::date so much faster than current_date

2015-11-17 Thread Tom Lane
David Rowley writes: > On 17 November 2015 at 21:49, Thomas Kellerer wrote: >> So I ran this on my Windows laptop with Postgres 9.4.5, 64bit and indeed >> now()::date is much faster than current_date: > You can see that the implementation of

[PERFORM] Why is now()::date so much faster than current_date

2015-11-17 Thread Thomas Kellerer
Hello, I stumbled over this answer: http://stackoverflow.com/a/9717125/330315 and this sounded quite strange to me. So I ran this on my Windows laptop with Postgres 9.4.5, 64bit and indeed now()::date is much faster than current_date: explain analyze select current_date from