[no subject]

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

 



I have explained/analyzed all the queries but, unfortunately, they are
on an isolated computer.  The gist is that, for relatively
low-incidence values of name, the UNION performs better, but for
queries on a common name, the dual-subselect query performs better.

The explains look something like:
Dual-subselect:
Seq scan on ip_info
  Filter:  ... AND ((hashed_subplan) OR (hashed_subplan))
  Subplan
    -> Result
      -> Append
        -> various scans on host_events
    -> Result
      -> Append
        -> various scans on network_events

UNION SELECT DISTINCT:

Nested Loop
  -> Unique
    -> Sort
      -> Append
        -> Unique
          -> Sort
            -> Result
              -> Append
                -> various scans on host_events
        -> Unique
          -> Sort
            -> Result
              -> Append
                -> various scans on network_events

If it would help to have more information, I could retype some of
numbers in the explain.

Any ideas?

Thanks,
-Mike


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

  Powered by Linux