- Create
UNLOGGED
table. This reduces the amount of data written to persistent storage by up to 2x. - Set
WITH (autovacuum_enabled=false)
on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we neverDELETE
orUPDATE
the table). - Insert rows with
COPY FROM STDIN
. This is the fastest possible approach to insert rows into table. - Minimize the number of indexes in the table, since they slow down inserts. Usually an index
on
time timestamp with time zone
is enough. - Add
synchronous_commit = off
topostgresql.conf
. - Use table inheritance for fast removal of old data:
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 ( | |
"archive/zip" | |
"bytes" | |
"flag" | |
"fmt" | |
"image" | |
"image/color" | |
_ "image/jpeg" |
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
``` | |
filter eventName="ConsoleLogin" | |
| stats count(*) as eventCount by userIdentity.userName, sourceIPAddress | |
| sort eventCount desc | |
filter not sourceIPAddress =~ /^(?i)123.123.123.123/ and userIdentity.userName =~/^(?i)\w/ | |
| stats count(*) as eventCount by eventName, userIdentity.userName, sourceIPAddress | |
| sort eventCount desc | |
filter eventName="ConsoleLogin" |
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
{ | |
"receipt": { | |
"type": "android-playstore", | |
"id": "12345678901234567890.1234567890123456", | |
"purchaseToken": "purchase token goes here", | |
"receipt": "{"orderId":"12345678901234567890.1234567890123456","packageName":"com.example.app","productId":"com.example.app.product","purchaseTime":1417113074914,"purchaseState":0,"purchaseToken":"purchase token goes here"}", | |
"signature": "signature data goes here" | |
} | |
} |
Changes:
-
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
-
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
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
From 233f504a39aca6e8b2d9332ef324b4c5cc397eca Mon Sep 17 00:00:00 2001 | |
From: Aaron Suggs <[email protected]> | |
Date: Fri, 6 Apr 2012 18:35:38 -0400 | |
Subject: [PATCH 1/2] Whitespace: tabs to spaces | |
--- | |
examples/init.sh | 90 +++++++++++++++++++++++++++--------------------------- | |
1 files changed, 45 insertions(+), 45 deletions(-) | |
diff --git a/examples/init.sh b/examples/init.sh |
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
// It's more advisable to store the compiled version of the jQuery template in JST, | |
// And then use a separate function that renders on a per-use basis from that pre-compiled template. | |
function jqueryCacheTemplate(templateString){ | |
return $.template(null, templateString); | |
} | |
function jqueryTemplate(name){ | |
return $.tmpl(JST[name], arguments[0], arguments[1]); | |
} |