Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration. - Mailing list pgsql-performance
From | Pavel Stehule |
---|---|
Subject | Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration. |
Date | |
Msg-id | CAFj8pRAG1x1ztqDQ1Y3A1bqnSkzX208CNo7Y037CYJ5Y5iLK7w@mail.gmail.com Whole thread Raw |
In response to | Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration. (aditya desai <admad123@gmail.com>) |
List | pgsql-performance |
so 3. 4. 2021 v 17:30 odesílatel aditya desai <admad123@gmail.com> napsal:
adding the group.aad_log_min_messages | warning | configuration fileapplication_name | psql | clientarchive_command | c:\postgres\bin\xlogcopy\xlogcopy.exe archive blob "%f" "%p" | configuration filearchive_mode | on | configuration filearchive_timeout | 15min | configuration fileauthentication_timeout | 30s | configuration fileautovacuum_analyze_scale_factor | 0.05 | configuration fileautovacuum_naptime | 15s | configuration fileautovacuum_vacuum_scale_factor | 0.05 | configuration filebgwriter_delay | 20ms | configuration filebgwriter_flush_after | 512kB | configuration filebgwriter_lru_maxpages | 100 | configuration filecheckpoint_completion_target | 0.9 | configuration filecheckpoint_flush_after | 256kB | configuration filecheckpoint_timeout | 5min | configuration fileclient_encoding | UTF8 | clientconnection_ID | 5b59f092-444c-49df-b5d6-a7a0028a7855 | clientconnection_PeerIP | fd40:4d4a:11:5067:6d11:500:a07:5144 | clientconnection_Vnet | on | clientconstraint_exclusion | partition | configuration filedata_sync_retry | on | configuration fileDateStyle | ISO, MDY | configuration filedefault_text_search_config | pg_catalog.english | configuration filedynamic_shared_memory_type | windows | configuration fileeffective_cache_size | 160GB | configuration fileenable_seqscan | off | configuration fileforce_parallel_mode | off | configuration filefrom_collapse_limit | 15 | configuration filefull_page_writes | off | configuration filehot_standby | on | configuration filehot_standby_feedback | on | configuration filejoin_collapse_limit | 15 | configuration filelc_messages | English_United States.1252 | configuration filelc_monetary | English_United States.1252 | configuration filelc_numeric | English_United States.1252 | configuration filelc_time | English_United States.1252 | configuration filelisten_addresses | * | configuration filelog_checkpoints | on | configuration filelog_connections | on | configuration filelog_destination | stderr | configuration filelog_file_mode | 0640 | configuration filelog_line_prefix | %t-%c- | configuration filelog_min_messages_internal | info | configuration filelog_rotation_age | 1h | configuration filelog_rotation_size | 100MB | configuration filelog_timezone | UTC | configuration filelogging_collector | on | configuration filemaintenance_work_mem | 1GB | configuration filemax_connections | 1900 | configuration filemax_parallel_workers_per_gather | 16 | configuration filemax_replication_slots | 10 | configuration filemax_stack_depth | 2MB | environment variablemax_wal_senders | 10 | configuration filemax_wal_size | 26931MB | configuration filemin_wal_size | 4GB | configuration filepg_qs.query_capture_mode | top | configuration filepgms_wait_sampling.query_capture_mode | all | configuration filepgstat_udp_port | 20224 | command lineport | 20224 | command linerandom_page_cost | 1.1 | configuration fileshared_buffers | 64GB | configuration filessl | on | configuration filessl_ca_file | root.crt | configuration filesuperuser_reserved_connections | 5 | configuration fileTimeZone | EET | configuration filetrack_io_timing | on | configuration filewal_buffers | 128MB | configuration filewal_keep_segments | 25 | configuration filewal_level | replica | configuration filework_mem | 16MB | configuration file
max_connections | 1900
it is really not good - there can be very high CPU overloading with a lot of others issues.
On Sat, Apr 3, 2021 at 8:59 PM aditya desai <admad123@gmail.com> wrote:Hi Bruce,Please find the below output.force_parallel_mode if off now.aad_log_min_messages | warning | configuration fileapplication_name | psql | clientarchive_command | c:\postgres\bin\xlogcopy\xlogcopy.exe archive blob "%f" "%p" | configuration filearchive_mode | on | configuration filearchive_timeout | 15min | configuration fileauthentication_timeout | 30s | configuration fileautovacuum_analyze_scale_factor | 0.05 | configuration fileautovacuum_naptime | 15s | configuration fileautovacuum_vacuum_scale_factor | 0.05 | configuration filebgwriter_delay | 20ms | configuration filebgwriter_flush_after | 512kB | configuration filebgwriter_lru_maxpages | 100 | configuration filecheckpoint_completion_target | 0.9 | configuration filecheckpoint_flush_after | 256kB | configuration filecheckpoint_timeout | 5min | configuration fileclient_encoding | UTF8 | clientconnection_ID | 5b59f092-444c-49df-b5d6-a7a0028a7855 | clientconnection_PeerIP | fd40:4d4a:11:5067:6d11:500:a07:5144 | clientconnection_Vnet | on | clientconstraint_exclusion | partition | configuration filedata_sync_retry | on | configuration fileDateStyle | ISO, MDY | configuration filedefault_text_search_config | pg_catalog.english | configuration filedynamic_shared_memory_type | windows | configuration fileeffective_cache_size | 160GB | configuration fileenable_seqscan | off | configuration fileforce_parallel_mode | off | configuration filefrom_collapse_limit | 15 | configuration filefull_page_writes | off | configuration filehot_standby | on | configuration filehot_standby_feedback | on | configuration filejoin_collapse_limit | 15 | configuration filelc_messages | English_United States.1252 | configuration filelc_monetary | English_United States.1252 | configuration filelc_numeric | English_United States.1252 | configuration filelc_time | English_United States.1252 | configuration filelisten_addresses | * | configuration filelog_checkpoints | on | configuration filelog_connections | on | configuration filelog_destination | stderr | configuration filelog_file_mode | 0640 | configuration filelog_line_prefix | %t-%c- | configuration filelog_min_messages_internal | info | configuration filelog_rotation_age | 1h | configuration filelog_rotation_size | 100MB | configuration filelog_timezone | UTC | configuration filelogging_collector | on | configuration filemaintenance_work_mem | 1GB | configuration filemax_connections | 1900 | configuration filemax_parallel_workers_per_gather | 16 | configuration filemax_replication_slots | 10 | configuration filemax_stack_depth | 2MB | environment variablemax_wal_senders | 10 | configuration filemax_wal_size | 26931MB | configuration filemin_wal_size | 4GB | configuration filepg_qs.query_capture_mode | top | configuration filepgms_wait_sampling.query_capture_mode | all | configuration filepgstat_udp_port | 20224 | command lineport | 20224 | command linerandom_page_cost | 1.1 | configuration fileshared_buffers | 64GB | configuration filessl | on | configuration filessl_ca_file | root.crt | configuration filesuperuser_reserved_connections | 5 | configuration fileTimeZone | EET | configuration filetrack_io_timing | on | configuration filewal_buffers | 128MB | configuration filewal_keep_segments | 25 | configuration filewal_level | replica | configuration filework_mem | 16MB | configuration fileRegards,Aditya.On Sat, Apr 3, 2021 at 8:34 PM Bruce Momjian <bruce@momjian.us> wrote:On Sat, Apr 3, 2021 at 08:29:22PM +0530, aditya desai wrote:
> Hi Michael,
> Thanks for your response.
> Is this table partitioned? - No
> How long ago was migration done? - 27th March 2021
> Has vacuum freeze and analyze of tables been done? - We ran vacuum analyze.
> Was index created after populating data or reindexed after perhaps? - Index
> was created after data load and reindex was executed on all tables yesterday.
> Version is PostgreSQL-11
FYI, the output of these queries will show u what changes have been made
to the configuration file:
SELECT version();
SELECT name, current_setting(name), source
FROM pg_settings
WHERE source NOT IN ('default', 'override');
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
pgsql-performance by date: