Re: creating of temporary table takes very long - Mailing list pgsql-performance

From Tom Lane
Subject Re: creating of temporary table takes very long
Date
Msg-id 19622.1145400512@sss.pgh.pa.us
Whole thread Raw
In response to Re: creating of temporary table takes very long  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-performance
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> You might try rewriting the coalesces into a row comparison...
> WHERE row($4, $5, ...) IS NOT DISTINCT FROM row(interface_id, source_id, ...)

That would be notationally nicer, but no help performance-wise; I'm
fairly sure that IS DISTINCT doesn't get optimized in any fashion
whatsoever :-(

What might be worth trying is functional indexes on the COALESCE(foo,0)
expressions.  Or if possible, consider revising your data schema to
avoid using NULLs in a way that requires assuming that NULL = NULL.

            regards, tom lane

pgsql-performance by date:

Previous
From: Theo Kramer
Date:
Subject: Multicolumn order by
Next
From: Tom Lane
Date:
Subject: Re: Multicolumn order by