You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I agree it is good to always require a where, in haskell! But it would be nice if the generated SQL statement will be optimised when (const $ val_ True) is used, because then the database (at least sqlite) can optimise it heavily.
So I wonder if beam could just drop the where clause if the expression is just 1? Or maybe there's a good reason for it (otherwise sqlite could have done the same optimisation?)
The text was updated successfully, but these errors were encountered:
As #370 shows the way to truncate a table is
And I agree it is good to always require a where, in haskell! But it would be nice if the generated SQL statement will be optimised when
(const $ val_ True)
is used, because then the database (at least sqlite) can optimise it heavily.This is the current generated sql:
See the difference when the where clause is not there:
So I wonder if beam could just drop the where clause if the expression is just
1
? Or maybe there's a good reason for it (otherwise sqlite could have done the same optimisation?)The text was updated successfully, but these errors were encountered: