----- Original Message -----
From: "Eli Mesika" <emesika(a)redhat.com>
To: "engine-devel(a)ovirt.org" <devel(a)ovirt.org>
Sent: Wednesday, March 11, 2015 10:48:44 AM
Subject: [ovirt-devel] Important changes in the Search Engine code
Hi All
We had in the past many cases in which the search engine returned duplicate
records.
Most of those cases are not simple to resolve in the DB layer by changing the
query due to schema limitations.
We had decided to handle that by adding DISTINCT to the queries that the
search engine generates [1]
Wouldn't that cause some penalty for each query ? Each navigation between tabs in
the UI will become slower now that the returned values need to be sorted, even when
not required ?
However, we might have cases in which both DISTINCT and ORDER BY
f({args})
(where f is a function call) is used
In that case, we will get SQL exception since the ORDER BY is applied on the
DISTINCT result that does not include f as a field.
I had prevented using DISTINCT in such cases [2]
That means that you still may got duplicates in such cases and then you
should handle it in the same method as in [3]
(basically returning the function result in the select as a computed field)
[1]
https://gerrit.ovirt.org/#/c/31896
[2]
https://gerrit.ovirt.org/#/c/38459
[3]
https://gerrit.ovirt.org/#/c/36946
Thanks
Eli Mesika
_______________________________________________
Devel mailing list
Devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel