On 08.02.2011 23:50, Branko Čibej wrote:
> Well, here it is, I fixed the thinko in the actual_props query and got
> all prop_tests to pass with this version. Did I say that the way
> ACTUAL_NODE is separate from NODE makes these kinds of WC operations
> (that merge results from both tables) quite complex and expensive?

By the way, there's a simpler query that'll return the same result, but
it uses an outer join instead of an inner join and takes forever -- it'd
be twice as slow as the plain-vanilla trunk is right now.

I suspect that if instead we "materialized" that outer join by simply
merging NODES and ACTUAL_NODE into one table, denoting the ACTUAL_ bit
with a new (higher) op_depth value, then my patch could have dropped a
join and a whole query, making the proplist about twice as fast as the
patch currently makes it. I'm sure a number of other queries could be
improved that way, too. It would mean dropping some NOT NULL
constraints, and would make the NODES table a bit larger; but
performance-wise, having the whole shebang in a single table and
avoiding outer joins (either programmatic or in queries) would open the
door for further performance improvements and code simplification.

-- Brane

Reply via email to