Skip to content

Instantly share code, notes, and snippets.

View jordanlewis's full-sized avatar
👀
large data banking

Jordan Lewis jordanlewis

👀
large data banking
View GitHub Profile
I190214 14:50:10.231918 348 util/mon/bytes_usage.go:616 [n1,client=127.0.0.1:51014,user=root] flow: now at 10240 bytes (+10240) - bytes_usage.go:550:util/mon.(*BoundAccount).Grow,builtins.go:214:sql/sem/builtins.glob..func17,eval.go:3583:sql/sem/tree.(*FuncExpr).Eval,expr.go:194:sql/distsqlrun.(*exprHelper).eval,processors.go:375:sql/distsqlrun.(*ProcOutputHelper).ProcessRow,processors.go:778:sql/distsqlrun.(*ProcessorBase).ProcessRowHelper,tablereader.go:290:sql/distsqlrun.(*tableReader).Next,base.go:175:sql/distsqlrun.Run,processors.go:801:sql/distsqlrun.(*ProcessorBase).Run,flow.go:593:sql/distsqlrun.(*Flow).startInternal.func1,asm_amd64.s:1333:runtime.goexit,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?,?:0:?
I190214 14:50:10.232029 454 util/mon/bytes_usage.go:640 [n1,client=127.0.0.1:51014,user=root] flow: now at 0 bytes (-10240) - bytes_usage.go:512:util/mon.(*BoundAccount).Close,bytes_usage.go:499:util/mon.(*BoundAccount).Clear,flow.go:265:sql/distsqlrun.(*accountClearingRowReceiver).Push,base.go:6
@jordanlewis
jordanlewis / README.md
Created January 26, 2019 05:47
SCRIPT-8
@jordanlewis
jordanlewis / gist:cb6c74f5caafba69e61cea0dcade4491
Created January 16, 2019 18:59
log of cockroach demo for explain meeting
```
[13:09]% ./cockroach demo jordan@Termato:~/repo/src/github.com/cockroachdb/cockroach on master -> origin/master
#
# Welcome to the CockroachDB demo database!
#
# You are connected to a temporary, in-memory CockroachDB
# instance. Your changes will not be saved!
#
# Web UI: http://127.0.0.1:63371
#
'stacktrace: {u\'frames\': [{u\'function\': u\'func4\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'pre_context\': [u\'\tif sqlServer != nil {\', u\'\t\twg.Add(1)\', u\'\t\tgo func() {\'], u\'post_context\': [u"\t\t\t// TODO(andrei): Should we sometimes transmit the writerErr\'s to the", u\'\t\t\t// client?\', u\'\t\t\twg.Done()\'], u\'filename\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'module\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl\', u\'in_app\': True, u\'context_line\': u\'\t\t\twriterErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)\', u\'lineno\': 319}, {u\'function\': u\'ServeConn\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go\', u\'pre_context\': [u\'\t\tr := recover()\', u\'\t\th.ex.closeWrapper(ctx, r)\', u\'\t}()\'], u\'post_context\': [u\'}\', u\'\', u"// sessionParams groups arguments for initializing a connExecut
```'stacktrace: {u\'frames\': [{u\'function\': u\'func4\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'pre_context\': [u\'\tif sqlServer != nil {\', u\'\t\twg.Add(1)\', u\'\t\tgo func() {\'], u\'post_context\': [u"\t\t\t// TODO(andrei): Should we sometimes transmit the writerErr\'s to the", u\'\t\t\t// client?\', u\'\t\t\twg.Done()\'], u\'filename\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go\', u\'module\': u\'github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).serveImpl\', u\'in_app\': True, u\'context_line\': u\'\t\t\twriterErr = sqlServer.ServeConn(ctx, connHandler, reserved, cancelConn)\', u\'lineno\': 319}, {u\'function\': u\'ServeConn\', u\'abs_path\': u\'/Users/jordan/repo/src/github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go\', u\'pre_context\': [u\'\t\tr := recover()\', u\'\t\th.ex.closeWrapper(ctx, r)\', u\'\t}()\'], u\'post_context\': [u\'}\', u\'\', u"// sessionParams groups arguments for initializing a connExe
..........................#...........................................................................................................................................................................................................
..........................|...........................................................................................................................................................................................................
..........................|...........................................................................................................................................................................................................
..........................|...........................................................................................................................................................................................................
..........................|.........................................................................
#!/usr/bin/python
class T(object):
def __init__(self, n=0, lists=None):
self.lists = lists if lists is not None else []
if lists is None:
# lists contains normal lists and t's as well
self.lists = []
# cached length prefix
self.n = n
license: mit
scrolling: true
height: 300
@jordanlewis
jordanlewis / .block
Created May 21, 2017 17:58 — forked from drzax/.block
Narrative Charts
license: mit
scrolling: true
height: 300
import psycopg2
binary = b'\xff\xd8\xff\xe0\x00\x10'
conn = psycopg2.connect('postgresql://root@localhost:26257/test?sslmode=disable')
with conn as conn, conn.cursor() as c:
c.execute('select %s::BYTEA', (binary, ))
rv, = c.fetchone()