To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=92164





------- Additional comments from [EMAIL PROTECTED] Mon Jul 28 12:04:30 +0000 
2008 -------
fs->oj: there's two problems here:

First, when a query is asked for its columns, its first approach is to use a
SingleSelectQueryComposer. Only if this fails, a fallback to a prepared
statement (and its result set meta data) is used. I suppose the proper solution
here is to *not* use a query composer if the query's EscapeProcessing is set to
FALSE.

Second, the SingleSelectQueryComposer builds an SQL statement from the SELECT
part of the underlying statement, a WHERE 0 = 1 condition, and the original
GROUP BY clause. In particular, it completely drops the original where 
condition.
Now the query in the example selects a cartesian product of three tables, but
limits the results with a WHERE condition. The SingleSelectQueryComposer drops
the WHERE condition, so what's left is a mere cartesian product over 3 very
large tables - and this is *extremely* expensive. (Yes, in theory the Jet Engine
could recognize and value the "WHERE 0=1" condition, but obviously it doesn't.)

So, I think we should first fix the Query implementation, which will make the
bug here vanish. However, we should also fix the SingleSelectQueryComposer, to
retain the original WHERE clause, else the bug might re-appear in other
circumstances.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to