- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
This file contains 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
iot_devicereadings=# \d+ iot.device_reading | |
Table "iot.device_reading" | |
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description | |
-----------+-----------------------------+-----------+----------+---------+----------+-------------+--------------+------------- | |
asset_id | character varying(36) | | not null | | extended | | | | |
vendor | character varying(36) | | not null | | extended | | | | |
vendor_id | character varying(36) | | not null | | extended | | | | |
type | character varying(36) | | not null | | extended | | | | |
value | real | | not null | | plain | | | | |
created | timestamp without time zone | | not null | |
This file contains 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
CREATE OR REPLACE FUNCTION jsonb_merge(left JSONB, right JSONB) RETURNS JSONB AS $$ | |
var mergeJSON = function (target, add) { | |
function isObject(obj) { | |
if (typeof obj == "object") { | |
for (var key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
return true; // search for first object prop | |
} | |
} |
This file contains 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
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
This file contains 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
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script sets ownership for all tables, sequences, views, and functions for a given schema. | |
Run this script as your postgres OS user. |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am pdeaudney on github. | |
* I am pdeaudney (https://keybase.io/pdeaudney) on keybase. | |
* I have a public key whose fingerprint is C6EF ED7A 301C 9785 1799 D249 0C8F D09B D8FD A3E3 | |
To claim this, I am signing this object: |
This file contains 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
# Dell Facter module | |
# | |
# Author: Mikael Fridh <[email protected]> | |
# Date: 2011-11-24 | |
# | |
# this is a rather substantial rewrite of the camptocamp puppet module | |
# https://github.com/camptocamp/puppet-dell | |
# | |
# The regex matching has been ripped out completely and replaced with | |
# some xpath expressions from Nokogiri. Unfortunately this means another |
This file contains 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
/* | |
* Write a Java program that reads one 6-digit integer from the user. | |
* It then prints out these 6 digits, each separated from the preceding one by 2 spaces. | |
*/ | |
import java.util.*; | |
public class Week2Exercise6{ | |
public static void main(String[] args){ | |
System.out.println("Please enter in a single six digit integer:"); | |
Scanner i = new Scanner(System.in); |