Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group