This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.
⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.
shared_buffers=128MB
iotop
and txg_sync
is performing a lot of IO. Example:shared_buffers
, almost the entire DB should be cached in the ARC and the ZFS benchmark should not suffer so greatly.Please refer to ZFS 2-3x slower than EXT4 to see how ZFS defaults + Postgres defaults severely underperform EXT4 defaults + Postgres defaults (and also to know more about the system on which these benchmarks were performed). This page documents how to tune ZFS + Postgres to give better performance for the tpcb-like benchmark.
Please do not copy these settings blindly because I am myself not clear on why/how these settings had the impact they did. For example, I cannot explain why full_page_writes=off
independently did not give that much boost, nor did an optimized PG configuration. However, putting both of them together gave a 2-4x boost compared to baseline numbers.
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
** Find commmonly accessed tables and their use of indexes: | |
SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
Returns output like: | |
relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
----------------------+--------------+---------------+------------------------ | |
schema_migrations | 817 | 0 | 0.00000000000000000000 | |
user_device_photos | 349 | 0 | 0.00000000000000000000 |
/* | |
* OpenSimplex Noise in Java. | |
* by Kurt Spencer | |
* | |
* v1.1 (October 5, 2014) | |
* - Added 2D and 4D implementations. | |
* - Proper gradient sets for all dimensions, from a | |
* dimensionally-generalizable scheme with an actual | |
* rhyme and reason behind it. | |
* - Removed default permutation array in favor of |
/* | |
* fork.c | |
* Experimental fork() on Windows. Requires NT 6 subsystem or | |
* newer. | |
* | |
* Copyright (c) 2012 William Pitcock <[email protected]> | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. |
commands: | |
00_update_composer: | |
command: export HOME=/root && export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
option_settings: | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: COMPOSER_HOME | |
value: /root | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: HOME |
/** | |
* Based on the mysql cluster | |
* @link http://jonisalonen.com/2012/k-means-clustering-in-mysql/ | |
*/ | |
-- SELECT | |
-- * FROM | |
-- unnest(kmeans(array(SELECT | |
-- ( | |
-- lat, |
-- Create the raw events table | |
CREATE TABLE page_views ( | |
site_id int, | |
path text, | |
client_ip inet, | |
view_time timestamptz default now(), | |
view_id bigserial | |
); | |
-- Allow fast lookups of ranges of sequence IDs |