SmartPostgres/Box-of-Tricks(新しいタブで開きます)
主要言語: PLpgSQL
Utilities for Postgres databases.
- star 数
- 58
- watcher 数
- 9
- fork 数
- 11
- issue 数
- 7
- 最終更新
- 2025/09/24
主要言語: PLpgSQL
Utilities for Postgres databases.
Utility scripts to make PostgreSQL performance tuning easier.
Brought to you by the folks at SmartPostgres.com.
Report Bug
·
Contribute Code for a Feature
Click Releases at the top of this page to download the installation file, which contains each of the sql scripts.
Our target audience is folks who already know how to create and query Postgres functions. If you don't fall into that audience, we're not quite ready for you yet, but at some point in the future we'll have more detailed instructions for folks who are completely new to Postgres.
The Box of Tricks works with all currently supported versions of Postgres (as of this writing, going back to v12), plus Amazon RDS Aurora PostgreSQL. Other proprietary cloud brands of Postgres may also work, we just haven't tested 'em. If you run into problems on other versions, we only take bug reports that also include a pull request to make the necessary changes. Otherwise, we just can't test the Box of Tricks on every possible cloud platform.
This function analyzes the health and design of your indexes.
Parameters include:
To check the health and design of all of the tables & indexes in your database, run:
select * from check_indexes(null, null);
Those first two parameters are schema name and table name. If you want to check all of the objects in a particular schema, run:
select * from check_indexes('my_schema_name', null)
Or to check a single table:
select * from check_indexes('my_schema_name', 'my_table_name')
Output columns include (skipping the ob)
This function does what it says on the label. It's useful for training class attendees who want to reset a table to its base state before doing index tuning.
Parameters include:
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request as described in our Contributing Guide.
Distributed under the MIT License. See the LICENSE file for more information.
Brent Ozar - humans@smartpostgres.com
Project Link: https://github.com/SmartPostgres/Box-of-Tricks