https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42218

--- Comment #33 from Mark Hofstetter <[email protected]> ---
being asked for my opinion here, without really understanding the underlying
problem:

I am not a huge fan of views (esp aggregate) in sql for code because they
obfuscate the perceived data structure. If you need some data why not simply
excute the SQL itself, maybe nicely structured in a CTE (ie with statement)?

Just to be sure and that everybody is aware of the facts:
+ views don't speed up SQL
+ both in views and and CTEs, filtering by calculated values may slow down the
query unpredictably as predicate pushdown may or may not work as you'd expect.

Aggregating should always be done in SQL not by looping over the data as it is
transaction save and magnitudes faster.

NEVER use invoker rights with a db object (unless you really know what you are
doing)

If somebody wants to explain to me what the problem is, I am more than willing
to listen.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to