Does FILTER in SEQSCAN short-circuit AND?

From: "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Does FILTER in SEQSCAN short-circuit AND?
Date: 2010-05-18 22:28:25
Message-ID: hsv49v$312j$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sample code:

SELECT *
FROM MyTable
WHERE foo = 'bar' AND MySlowFunc('foo') = 'bar'

Let's say this required a SEQSCAN because there were no indexes to support
column foo. For every row where foo <> 'bar' would the filter on the SEQSCAN
short-circuit the AND return false right away, or would it still execute
MySlowFunc('foo') ?

Thanks!

Carlo

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2010-05-19 00:17:33 merge join killing performance
Previous Message Jon Nelson 2010-05-17 12:35:35 Re: Slow Bulk Delete