rethinkdb

samueldev 2016-07-19T14:21:35.000003Z

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

samueldev 2016-07-19T14:21:44.000004Z

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

apa512 2016-07-19T15:03:30.000005Z

i visit occasionally. what's up?

samueldev 2016-07-19T15:04:29.000006Z

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

samueldev 2016-07-19T15:04:42.000007Z

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

samueldev 2016-07-19T15:05:08.000011Z

(5,500 lines)

samueldev 2016-07-19T15:06:23.000012Z

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)

samueldev 2016-07-19T15:07:34.000014Z

Or am I just way off base here

apa512 2016-07-19T15:50:00.000015Z

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.

samueldev 2016-07-19T16:22:16.000016Z

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

samueldev 2016-07-19T16:22:27.000017Z

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

samueldev 2016-07-19T16:22:44.000018Z

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

samueldev 2016-07-19T16:22:58.000019Z

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_langford 2016-07-19T16:25:24.000020Z

Sometimes just rewriting a component is saner than figuring out it’s inner workings

apa512 2016-07-19T18:59:30.000021Z

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.

samueldev 2016-07-19T19:00:45.000022Z

πŸ˜›