This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-02
Channels
- # announcements (25)
- # babashka (76)
- # beginners (74)
- # biff (36)
- # calva (11)
- # cider (5)
- # clerk (43)
- # cljs-dev (4)
- # cljsrn (12)
- # clojure (111)
- # clojure-austin (14)
- # clojure-europe (82)
- # clojure-nl (2)
- # clojure-norway (5)
- # clojure-uk (1)
- # clojurescript (36)
- # core-async (13)
- # cursive (30)
- # datomic (12)
- # fulcro (6)
- # honeysql (9)
- # hyperfiddle (73)
- # instaparse (3)
- # introduce-yourself (1)
- # membrane (40)
- # nbb (2)
- # off-topic (6)
- # other-languages (9)
- # polylith (33)
- # reagent (2)
- # reitit (7)
- # rum (7)
- # shadow-cljs (47)
- # tools-deps (10)
- # vim (11)
- # xtdb (16)
Is it a reasonable proposal to automatically inline everything that can't be used for injections? Like numbers or dates.
This would potentially reduce the effect of statement-caching + increase the parsing overhead of your queries (server-side). But this might not be that important
I don't know where the overhead will come from given that there's plenty of instance?
-like checks there already, but the point about caching is a good one, I haven't thought of it. Still yet to use caching in my projects.
When using postgres, statement-caching is enabled by default. I found https://dev.to/yugabyte/postgres-query-execution-jdbc-prepared-statements-51e2 to be an excellent explanation
Ah, we're talking about different caches. That's good to know about JDBC. But HoneySQL itself has a cache: https://cljdoc.org/d/com.github.seancorfield/honeysql/2.4.980/doc/getting-started/general-reference?q=cach#caching
I believe tha eg Oracle keeps several caches around for performance. Eg a query needs to be planned. If you use prepared statements, (again, I believe) that each instance of the prepared statement gets the same plan, whereas if you inline the params, it’d need to create a plan for each instance.
Right now, HoneySQL doesn't know how to inline dates anyway so that would have to be fixed first... 😕
(and its not clear what that would need to look like for ClojureScript)