Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1f7aa643
Commit
1f7aa643
authored
Jan 31, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize FAQ entry on performance.
parent
7069a885
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
74 deletions
+88
-74
doc/FAQ
doc/FAQ
+32
-32
doc/src/FAQ/FAQ.html
doc/src/FAQ/FAQ.html
+56
-42
No files found.
doc/FAQ
View file @
1f7aa643
Frequently Asked Questions (FAQ) for PostgreSQL
Frequently Asked Questions (FAQ) for PostgreSQL
Last updated:
Sun Jan 30 21:44:35
EST 2005
Last updated:
Mon Jan 31 15:40:24
EST 2005
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
...
@@ -346,40 +346,40 @@
...
@@ -346,40 +346,40 @@
By default, PostgreSQL only allows connections from the local machine
By default, PostgreSQL only allows connections from the local machine
using Unix domain sockets or TCP/IP connections. Other machines will
using Unix domain sockets or TCP/IP connections. Other machines will
not be able to connect unless you modify listen_addresses in the
not be able to connect unless you modify listen_addresses in the
postgresql.conf
and enable host-based authentication by modifying the
postgresql.conf
file, enable host-based authentication by modifying
file $PGDATA/pg_hba.conf accordingly
.
the $PGDATA/pg_hba.conf file, and restart the server
.
3.3) How do I tune the database engine for better performance?
3.3) How do I tune the database engine for better performance?
Certainly, indexes can speed up queries. The EXPLAIN ANALYZE command
There are three major areas for potential performance improvement:
allows you to see how PostgreSQL is interpreting your query, and which
indexes are being used.
Query Changes
This involves modifying queries to obtain better performance:
If you are doing many INSERTs, consider doing them in a large batch
using the COPY command. This is much faster than individual INSERTS.
+ Creation of indexes, including expression and partial indexes
Second, statements not in a BEGIN WORK/COMMIT transaction block are
+ Use of COPY instead of multiple INSERTs
considered to be in their own transaction. Consider performing several
+ Grouping of multiple statements into a single transaction to
statements in a single transaction block. This reduces the transaction
reduce commit overhead
overhead. Also, consider dropping and recreating indexes when making
+ Use of CLUSTER when retrieving many rows from an index
large data changes.
+ Use of LIMIT for returning a subset of a query's output
+ Use of Prepared queries
There are several tuning options in the Administration Guide/Server
+ Use of ANALYZE to maintain accurate optimizer statistics
Run-time Environment/Run-time Configuration. You can disable fsync()
+ Regular use of VACUUM or pg_autovacuum
by using fsync option. This will prevent fsync()s from flushing to
+ Dropping of indexes during large data changes
disk after every transaction.
Server Configuration
You can use the shared_buffers option to increase the number of shared
A number of postgresql.conf settings affect performance. For
memory buffers used by the backend processes. If you make this
more details, see Administration Guide/Server Run-time
parameter too high, the postmaster may not start because you have
Environment/Run-time Configuration for a full listing, and for
exceeded your kernel's limit on shared memory space. Each buffer is 8K
commentary see
and the default is 1000 buffers.
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_co
nf_e.html and
You can also use the sort_mem (from PostgreSQL 8.0: work_mem) options
http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html.
to increase the maximum amount of memory used by the backend processes
for each temporary sort. The default is 1024 (i.e. 1MB).
Hardware Selection
The effect of hardware on performance is detailed in
You can also use the CLUSTER command to group data in tables to match
http://candle.pha.pa.us/main/writings/pgsql/hw_performance/inde
an index. See the CLUSTER manual page for more details
.
x.html
.
3.4) What debugging features are available?
3.4) What debugging features are available?
...
...
doc/src/FAQ/FAQ.html
View file @
1f7aa643
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment