Loading into cache from said PostgreSQL database the tables, which are most frequently scanned.
Project description
Limiter for loading into cache is the value of “effective_cache_size”.
It makes sense to use after restarting the server!
Before using, you need to connect to the database as superuser and add the extension ‘pg_prewarm’ (added to PostgreSQL since version 9.4):
create extension pg_prewarm;
Usage:
pg_hotcache [-?] [-h HOST] [-p PORT] [-U USERNAME] [-W PASSWORD] -d DBNAME
Optional arguments:
-?, --help show this help message and exit -h HOST, --host HOST database server host or socket directory (default: "local socket") -p PORT, --port PORT database server port (default: "5432") -U USERNAME, --username USERNAME database user name (default: "unix user") -W PASSWORD, --password PASSWORD force password prompt (should happen automatically) -d DBNAME, --dbname DBNAME database name for caching
Examples:
sudo -u postgres pg_hotcache -d dbname pg_hotcache -h 127.0.0.1 -p 5432 -U username -d dbname
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pg_hotcache-0.2.1.tar.gz
(3.6 kB
view details)
File details
Details for the file pg_hotcache-0.2.1.tar.gz
.
File metadata
- Download URL: pg_hotcache-0.2.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1c216f4f698a38c26b196da13cf3ce3c0e9910adfcda901ce6716cff500c28a |
|
MD5 | 8110adeb84800c22e70a81ed68d1d0c7 |
|
BLAKE2b-256 | fed46f4462a73f59dd67c0e1f115b453e6cfe6dd2ee927560ca7caec25a90050 |