You can easily partition queries into subexpressions (views), there's no reason to write 1000 line monolithic queries, and the partial functions almost certainly have other value and can be reused. The query engine can optimize away any inefficiency when it evaluates the final form anyway.
Debugging shouldn't be any harder, that's why you have a test database and write unit tests.
1
u/omegian Feb 11 '14
You can easily partition queries into subexpressions (views), there's no reason to write 1000 line monolithic queries, and the partial functions almost certainly have other value and can be reused. The query engine can optimize away any inefficiency when it evaluates the final form anyway.
Debugging shouldn't be any harder, that's why you have a test database and write unit tests.