Fork me on GitHub
#rethinkdb
<
2016-07-19
>
samueldev14:07:35

@apa512: what are the odds you hang out on this slack? ๐Ÿ™‚

samueldev14:07:44

or any other devs of clj-rethinkdb, I suppose...

apa51215:07:30

i visit occasionally. what's up?

samueldev15:07:29

I had opened the GH issue the other day regarding us trying to inspect a rethink query before it's sent to rethink

samueldev15:07:42

You had mentioned rethinkdb.query-builder/parse-term which gives us, well, this....

samueldev15:07:08

(5,500 lines)

samueldev15:07:23

So, I mean, correct me if I'm wrong, but this can't be what's literally sent over the wire to Rethink? My limited understanding was that the output should look something like what you might type into the RethinkDB browser query tool? (E.G. http://puu.sh/q71aE/9ba077ca4d.png)

samueldev15:07:34

Or am I just way off base here

apa51215:07:00

this is what's actually being sent, only converted to a json string. you can read more about it here: https://rethinkdb.com/docs/writing-drivers/#serializing-queries. is it a complicated query? 5,500 lines seems a bit crazy unless it includes data being inserted.

samueldev16:07:16

heh, so we're running into a number of issues in production

samueldev16:07:27

I guess what we did was locked a junior dev in a closet for 6 months to write all of our queries

samueldev16:07:44

cue them leaving the company, cue us running into prod issues RE query performance

samueldev16:07:58

annddd now we're trying to make sense of it (and trying to make sense of how one of these queries is 5,500 lines...) lol

mj_langford16:07:24

Sometimes just rewriting a component is saner than figuring out itโ€™s inner workings

apa51218:07:30

i see. that's a tricky situation. i can't make much sense of wtf.clj, but it seems likely that you're sending some very unoptimized queries.