GithubHelp home page GithubHelp logo

pgx_key_value_bench's Introduction

PGX Key Value Bench

This is a quick benchmark testing various ways of reading key/value data from PostgreSQL with the pgx driver.

It tests jsonb, hstore, and text[].

You can customize the number of key/value pairs and the number of rows.

jack@glados ~/dev/pgx_key_value_bench » PAIR_COUNT=5 ROW_COUNT=1 go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: github.com/jackc/pgx_key_value_bench
BenchmarkRead/jsonb_5_pairs_1_rows-16         	   23895	     46344 ns/op	    2559 B/op	      51 allocs/op
BenchmarkRead/jsonb_5_pairs_1_rows_no_decode-16         	   29391	     41024 ns/op	    1437 B/op	      19 allocs/op
BenchmarkRead/hstore_5_pairs_1_rows-16                  	   31377	     38213 ns/op	    1944 B/op	      21 allocs/op
BenchmarkRead/hstore_5_pairs_1_rows_no_decode-16        	   33012	     36628 ns/op	     927 B/op	       4 allocs/op
BenchmarkRead/text[]_5_pairs_1_rows-16                  	   29898	     39852 ns/op	    1698 B/op	      31 allocs/op
BenchmarkRead/text[]_5_pairs_1_rows_no_decode-16        	   32458	     37064 ns/op	     986 B/op	      15 allocs/op
PASS
ok  	github.com/jackc/pgx_key_value_bench	9.754s

pgx_key_value_bench's People

Contributors

jackc avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.