This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "Plan": { | |
| "Node Type": "Seq Scan", | |
| "Parallel Aware": false, | |
| "Relation Name": "congrats_on_loading_your_first_gist", | |
| "Alias": "congrats_on_loading_your_first_gist", | |
| "Startup Cost": 0.00, | |
| "Total Cost": 35.50, | |
| "Plan Rows": 2550, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "Plan": { | |
| "Node Type": "Nested Loop", | |
| "Parallel Aware": false, | |
| "Join Type": "Inner", | |
| "Startup Cost": 0.01, | |
| "Total Cost": 20010.01, | |
| "Plan Rows": 1000000, | |
| "Plan Width": 8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| postgres=# \timing | |
| Timing is on. | |
| postgres=# SELECT count(*) FROM generate_series(1, 10000); | |
| count | |
| ------- | |
| 10000 | |
| (1 row) | |
| Time: 2.587 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET search_path=query_test; | |
| DROP SCHEMA IF EXISTS query_test CASCADE; | |
| CREATE SCHEMA query_test; | |
| CREATE TABLE campaigns ( | |
| id int PRIMARY KEY, | |
| campaign_plan_id int | |
| ); | |
| INSERT INTO campaigns VALUES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT version(); | |
| version | |
| ---------------------------------------------------------------------------------------------------------------------------------- | |
| PostgreSQL 11.5 (Debian 11.5-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit | |
| (1 row) | |
| -- Why is this returning true? | |
| -- I think { and [ are considered to sort equally on this machine's `en_US` collation, | |
| -- so the result is the same as `'{' < '{a'` | |
| SELECT '{' < '[a' COLLATE "en_US"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SHOW LC_COLLATE; | |
| lc_collate | |
| ------------- | |
| en_US.UTF-8 | |
| (1 row) | |
| EXPLAIN ANALYZE | |
| SELECT g::text FROM generate_series(1, 10000) g ORDER BY 1; | |
| QUERY PLAN | |
| ------------------------------------------------------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func main() { | |
| f1 := &Foo{} | |
| f2 := &Foo{} | |
| fmt.Printf("%p = %p\n", f1, f2) | |
| b1 := &Bar{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| "sync" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| encoded_in = "\x00\x00\x00\x03aaa\x00\x00\x00\x06Binary\x02\x00\x00\x00\fP\x00\x84A\xEB\xF9~?\x966\xE7\x8A\x00\x00\x00\x03ccc\x00\x00\x00\x06String\x01\x00\x00\x00\x04test\x00\x00\x00\x03zzz\x00\x00\x00\x06Number\x01\x00\x00\x00\a0230.01\x00\x00\x00\x10\xC3\xB6ther_encodings\x00\x00\x00\x06String\x01\x00\x00\x00\x05T\xC3\xBCst" | |
| class EncodedMessage | |
| attr_accessor :data | |
| attr_accessor :md5 | |
| def initialize(data, md5) | |
| @data = [data].pack('a*') | |
| @md5 = md5 | |
| # TODO(fg) verify md5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * | |
| !**/*.go |