Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
codegeek
· 10y ago · 0 comments
"with" is not supported by mysql but sqlite supports it ? wow, didn't know that.
Comments
[–]
goldenkey
10y ago
You can still do many subselect queries without with. Its really only an issue with the more complex usages.
[–]
Xophmeister
10y ago
I personally find CTEs much easier to read than subqueries.
[–]
wesd
10y ago
and you can use them in multiple places. I'm not sure if you have the same subquery twice if the query optimizer uses a single dataset.
[–]
goldenkey
10y ago
Be careful though, above poster mentions that a chain of CTE is almost certain to lead to sequential scans rather than parallelized (optimized) execution.