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$ (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Sample code:

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') ?




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-2017 The PostgreSQL Global Development Group