Re: creating of temporary table takes very long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jim C. Nasby" <jnasby@xxxxxxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux