{"id":38196,"date":"2019-10-31T22:22:13","date_gmt":"2019-10-31T19:22:13","guid":{"rendered":"https:\/\/prohoster.info\/blog\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql\/"},"modified":"2019-10-31T22:22:13","modified_gmt":"2019-10-31T19:22:13","slug":"odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql","title":{"rendered":"Nj\u00eb nga metodat p\u00ebr t\u00eb marr\u00eb profilin e ngarkes\u00ebs dhe historikun e pritjeve n\u00eb PostgreSQL.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Vazhdoi Artikulli &#171;<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">P\u00ebrpjekja p\u00ebr t\u00eb krijuar nj\u00eb analog t\u00eb ASH p\u00ebr PostgreSQL <\/a><\/noindex>&#171;.<\/p>\n<p>Artikulli do t\u00eb shqyrtoj\u00eb dhe do t\u00eb tregoj\u00eb me k\u00ebrkesa dhe shembuj konkret\u00eb \u2014 \u00e7far\u00eb informacioni t\u00eb dobish\u00ebm mund t\u00eb merrni me an\u00eb t\u00eb historikut t\u00eb paraqitjes pg_stat_activity.<\/p>\n<blockquote><p>Kujdes.<br \/>\nN\u00eb lidhje me novitetin e tem\u00ebs dhe p\u00ebrfundimin e periudh\u00ebs s\u00eb testimit, artikulli mund t\u00eb p\u00ebrmbaj\u00eb gabime. Kritikat dhe v\u00ebrejtjet jan\u00eb gjithmon\u00eb t\u00eb mir\u00ebpritura dhe t\u00eb pritura.<\/p><\/blockquote>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>T\u00eb dh\u00ebnat hyr\u00ebse<\/h2>\n<p><\/p>\n<h3>Historia e paraqitjes pg_stat_statements<\/h3>\n<p>\n<b class=\"spoiler_title\">pg_stat_history<\/b><\/p>\n<pre><code class=\"pgsql\">KRIJO TABEL\u00cb pg_stat_history ( \nid SERIAL, \nsnapshot_timestamp timestamp pa zon\u00eb kohe, \ndatabase_id integer,\ndbid oid,\nuserid oid,\nqueryid bigint,\nquery tekst,\ncalls bigint, \ntotal_time double precision, \nmin_time double precision, \nmax_time double precision, \nmean_time double precision,\nstddev_time double precision,\nrows bigint,\nshared_blks_hit bigint, \nshared_blks_read bigint, \nshared_blks_dirtied bigint, \nshared_blks_written bigint, \nlocal_blks_hit bigint, \nlocal_blks_read bigint,\nlocal_blks_dirtied bigint, \nlocal_blks_written bigint, \ntemp_blks_read bigint,\ntemp_blks_written bigint,\nblk_read_time double precision, \nblk_write_time double precision, \nbaseline_id integer );<\/code><\/pre>\n<p>\n Tabela plot\u00ebsohet \u00e7do or\u00eb, duke p\u00ebrdorur dblink n\u00eb baz\u00ebn e t\u00eb dh\u00ebnave t\u00eb synuar. Kolona m\u00eb interesante dhe e dobishme n\u00eb tabel\u00eb \u00ebsht\u00eb, natyrisht <b>queryid<\/b>.<\/p>\n<h3>Historia e paraqitjes pg_stat_activity<\/h3>\n<p>\n<b class=\"spoiler_title\">archive_pg_stat_activity<\/b><\/p>\n<pre><code class=\"pgsql\">KRIJO TABEL\u00cb arkiv_pg_stat_activity\n(\n  timepoint timestamp pa zon\u00eb kohe,\n  datid             oid, \n  datname           em\u00ebr,\n  pid               integer,\n  usesysid          oid,\n  usename           em\u00ebr,\n  application_name  tekst,\n  client_addr       inet,\n  client_hostname   tekst,\n  client_port       integer,\n  backend_start     timestamp pa zon\u00eb kohe,\n  xact_start        timestamp pa zon\u00eb kohe,\n  query_start       timestamp pa zon\u00eb kohe,\n  state_change      timestamp pa zon\u00eb kohe,\n  wait_event_type   tekst,                     \n  wait_event        tekst,                   \n  state             tekst,                  \n  backend_xid       xid,                 \n  backend_xmin      xid,                \n  query             tekst,               \n  backend_type      tekst,\n  queryid           bigint\n);<\/code><\/pre>\n<p>\nTabeli paraqet nj\u00eb tabel\u00eb t\u00eb ndar\u00eb sipas or\u00ebve historike_pg_stat_activity (M\u00eb shum\u00eb k\u00ebtu \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467277\/\">pg_stat_statements + pg_stat_activity + loq_query = pg_ash? <\/a><\/noindex> dhe k\u00ebtu \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467181\/\">P\u00ebrpjekje p\u00ebr t\u00eb krijuar nj\u00eb analog t\u00eb ASH p\u00ebr PostgreSQL.)<\/a><\/noindex><\/p>\n<h2>T\u00eb dh\u00ebnat dal\u00ebse<\/h2>\n<p><\/p>\n<h3>KOHA E CPU KLASHT (SISTEMI + KLIENT\u00cbT)<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ME \n t SI\n (\n\tZBULO \t\t\n\t\t\tdate_trunc('sekond\u00eb', timepoint)\n\tFROM \tactivity_hist.archive_pg_stat_activity aa\n\tWHERE \ttimepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') DHE pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb')  DHE \n\t\t\t( aa.wait_event_type \u00cbSHT\u00cb NULL  ) DHE\n\t\t\taa.state = 'aktive'\n )\n ZBULO count(*) \n ND\u00cbR INTO cpu_total\n FROM t ;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">KOHA E CPU KLASHT (SISTEMI + KLIENT\u00cbT) : 28:37:46<\/code><\/pre>\n<p><\/p>\n<h3>KOHA E PRITJES KLASHT<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ME \n t SI\n (\n\tZBULO \t\t\n\t\t\tdate_trunc('sekond\u00eb', timepoint)\n\tFROM \tactivity_hist.archive_pg_stat_activity aa\n\tWHERE \ttimepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') DHE pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb')  DHE \n\t\t\t( aa.wait_event_type \u00cbSHT\u00cb JO NULL  ) DHE\n\t\t\taa.state = 'aktive'\n )\n ZBULO count(*) \n ND\u00cbR INTO cpu_total\n FROM t ;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">KOHA E PRITJES KLASHT : 30:12:49<\/code><\/pre>\n<p><\/p>\n<h3>Vlerat totale t\u00eb pg_stat_statements<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\"> --TOTAL pg_stat\n  SELECT \n    SUM(calls) AS calls, SUM(total_time)  AS total_time, SUM(rows) AS rows ,\n\tSUM(shared_blks_hit)  AS shared_blks_hit,SUM(shared_blks_read) AS shared_blks_read , \n\tSUM(shared_blks_dirtied) AS shared_blks_dirtied,SUM(shared_blks_written) AS shared_blks_written , \n    SUM(local_blks_hit) AS local_blks_hit , SUM(local_blks_read) AS local_blks_read , \n\tSUM(local_blks_dirtied) AS local_blks_dirtied , SUM(local_blks_written)  AS local_blks_written,\n\tSUM(temp_blks_read) AS temp_blks_read, SUM(temp_blks_written) temp_blks_written , \n\tSUM(blk_read_time) AS blk_read_time , SUM(blk_write_time) AS blk_write_time\n  INTO \n    pg_total_stat_history_rec\n  FROM \n    pg_stat_history\n  WHERE \n \tsnapshot_timestamp BETWEEN pg_stat_history_begin AND pg_stat_history_end AND \n\tqueryid IS NULL;<\/code><\/pre>\n<p><\/p>\n<h3>SQL DBTIME \u2014 koha totale e ekzekutimit t\u00eb k\u00ebrkesave<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">dbtime_total = interval '1 millisecond' * pg_total_stat_history_rec.total_time ;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">SQL DBTIME : 136:49:36<\/code><\/pre>\n<p><\/p>\n<h3>SQL CPU TIME \u2014 koha e CPU e shpenzuar p\u00ebr ekzekutimin e k\u00ebrkesave<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ME \n t AS\n (\n\tSELECT \t\t\n\t\t\tdate_trunc('second', timepoint)\n\tFROM \tactivity_hist.archive_pg_stat_activity aa\n\tWHERE \ttimepoint BETWEEN pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND pg_stat_history_end+(current_hour_diff * interval '1 hour')  AND \n\t\t\t( aa.wait_event_type IS NULL  ) AND\n\t\t\tbackend_type = 'client backend' AND \n\t\t\taa.state = 'active'\n )\n SELECT count(*) \n INTO cpu_total\n FROM t ;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">SQL CPU TIME : 27:40:15<\/code><\/pre>\n<p><\/p>\n<h3>SQL WAITINGS TIME \u2014 koha totale e pritjeve p\u00ebr k\u00ebrkesat<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ME\n t SI\n (\n\tZgjidh \t\t\n\t\t\tdata_trunc('sekond', timepoint)\n\tNga \tactivity_hist.archive_pg_stat_activity aa\n\tKUJT \ttimepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') DHE pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb')  DHE \n\t\t\t( aa.wait_event_type IS NOT NULL  ) DHE\n\t\t\taa.state = 'aktive' DHE \n\t\tbackend_type = 'klienti prapa'\n )\n Zgjidh count(*) \n N\u00cb waiting_total\n NGA t ;<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">KOHA E PRITJES SQL: 30:04:09<\/code><\/pre>\n<p>\nK\u00ebto k\u00ebrkesa jan\u00eb banale dhe p\u00ebr kursimin e hap\u00ebsir\u00ebs detajet e realizimit ato anashkalohen:<\/p>\n<p><b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre><code class=\"plaintext\">| KOHA IOTIME SQL: 19:44:50\n| KOHA E K\u00cbRKESES SQL: 19:44:32\n| KOHA E SHKRIMIT SQL: 00:00:17\n|\n| THIRRJET SQL: 12188248\n-------------------------------------------------------------\n| SHKALLAT E NDARJES SE SHERBIMEVE SQL: 7997039120\n| SHKALLAT E HITEVE TE SHERBIMEVE SQL: 8868286092\n| P\u00cbSHAT E HITEVE TE SHERBIMEVE SQL \/ SHKALLAT %: 110.89\n| SHKALLAT E DIRTUARA TE SHERBIMEVE SQL: 419945\n| SHKALLAT E SHKRIMT TE SHERBIMEVE SQL: 19857\n|\n| SHKALLAT TEMPORALE T\u00cb NDARJES SQL: 7836169\n| SHKALLAT TEMPORALE T\u00cb SHKRUARA SQL: 10683938\n<\/code><\/pre>\n<p>\nT\u00eb kalojm\u00eb te seksi m\u00eb interesant<\/p>\n<h2>STATISTIKAT E PRITJES<\/h2>\n<p><\/p>\n<h3>TOP 10 PRITJET NGA KOHA TOTAL E PRITJES P\u00cbR PROCESET E KLIENTIT<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ZRIN\n  wait_event_type , wait_event ,\n  merr_dh\u00ebnien_dhe_koh\u00ebn( wait_event_type , wait_event ,pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') ,pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb') ) si koh\u00eb \nNga\n  activity_hist.archive_pg_stat_activity aa\nKUJT \n  timepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') DHE pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb') DHE backend_type != 'klienti prapa' DHE wait_event_type IS NOT NULL \nGRUPI NGA \n  wait_event_type, wait_event\nRREGULLO Nga 3 ZBRIT\u00cbN\nKUFIZIMI 10<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+------------------------------------------------------------------------------------\n| 10 M\u00cb T\u00cb PRITUR NGA KOHA TOTALE E PRITJES P\u00cbR PROCESAT E SISTEMIT\n+-----+------------------------------+--------------------+--------------------\n|    #|               lloji_eventit_t\u00eb_pritjes|          ngjarja_e_pritjes|            koh\u00ebzgjatja\n+-----+------------------------------+--------------------+--------------------\n|    1|                      Aktiviteti| LogicalLauncherMain|            10:43:28\n|    2|                      Aktiviteti|      AutoVacuumMain|            10:42:49\n|    3|                      Aktiviteti|       WalWriterMain|            10:28:53\n|    4|                      Aktiviteti|    CheckpointerMain|            10:23:50\n|    5|                      Aktiviteti|        BgWriterMain|            09:11:59\n|    6|                      Aktiviteti|   BgWriterHibernate|            01:37:46\n|    7|                            IO|        BufFileWrite|            00:02:35\n|    8|                        LWLock|      buffer_mapping|            00:01:54\n|    9|                            IO|        DataFileRead|            00:01:23\n|   10|                            IO|            WALWrite|            00:00:59\n+-----+------------------------------+--------------------+--------------------\n<\/pre>\n<p><\/p>\n<h3>TOP 10 PRITJET NGA KOHA TOTAL E PRITJES P\u00cbR PROCESET E KLIENTIT<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">Zgjedh \n  lloji_eventit_t\u00eb_pritjes, ngjarja_e_pritjes,\n  get_clients_waiting_duration( lloji_eventit_t\u00eb_pritjes, ngjarja_e_pritjes, pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb'), pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb')) as koh\u00ebzgjatja\nNga \n  activity_hist.archive_pg_stat_activity aa\nK\u00ebtu \n  timepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 or\u00eb') DHE pg_stat_history_end+(current_hour_diff * interval '1 or\u00eb') DHE backend_type = 'client backend' DHE lloji_eventit_t\u00eb_pritjes NUK \u00cbSHT\u00cb NULL \nGRUPI NGA lloji_eventit_t\u00eb_pritjes, ngjarja_e_pritjes\nRENDIT NGA 3 ZBRITJE\nLIMIT 10<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+-----+------------------------------+--------------------+--------------------+----------\n|    #|               tipi_eventit_pritur|          eventi_pritur|            durata|  % dbtime\n+-----+------------------------------+--------------------+--------------------+----------\n|    1|                          Bllokim|       id_transaksionit|            08:16:47|      6.05\n|    2|                            IO|        LeximiSkedarit|            06:13:41|      4.55\n|    3|                       Skadimi|             PgSleep|            02:53:21|      2.11\n|    4|                        LWLock|      hartimi_bufrit|            00:40:42|       0.5\n|    5|                        LWLock|           io_bufrit|            00:17:17|      0.21\n|    6|                            IO|        ShkrimiBufit|            00:01:34|      0.02\n|    7|                          Bllokim|               tuple|            00:01:32|      0.02\n|    8|                        Klienti|          LeximiKlientit|            00:01:19|      0.02\n|    9|                            IO|         LeximiBufit|            00:00:37|      0.01\n|   10|                        LWLock|      p\u00ebrmbajtja_bufrit|            00:00:08|         0\n+-----+------------------------------+--------------------+--------------------+----------\n<\/pre>\n<p><\/p>\n<h3>TIPET E PRITURVE Sipas KOH\u00cbS S\u00cb TOTALIT T\u00cb PRITURVE, P\u00cbR PROCESET E SISTEMIT<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ZBRASNI\n  tipi_eventit_pritur ,\n  merr_koh\u00ebn_e_pritur_t\u00eb_sistemit( tipi_eventit_pritur , pg_stat_history_begin+(current_hour_diff * interval '1 hour') , pg_stat_history_end+(current_hour_diff * interval '1 hour') ) si durata\nFROM\n  activity_hist.archive_pg_stat_activity aa\nWHERE \n  koha_mesatare BETWEEN pg_stat_history_begin+(current_hour_diff * interval '1 hour') AND pg_stat_history_end+(current_hour_diff * interval '1 hour') AND  backend_type != 'klienti backend' AND tipi_eventit_pritur IS NOT NULL \nGROUP BY tipi_eventit_pritur\nORDER BY 2 DESC<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+-----+------------------------------+--------------------\n|    #|               wait_event_type|            duration\n+-----+------------------------------+--------------------\n|    1|                      Activity|            53:08:45\n|    2|                            IO|            00:06:24\n|    3|                        LWLock|            00:03:02\n+-----+------------------------------+--------------------\n<\/pre>\n<p><\/p>\n<h3> LLOJAT E PRITJES S\u00cb KLIENT\u00cbVE K\u00cbR VETM<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ZHVAT\n  wait_event_type ,\n  get_clients_waiting_type_duration( wait_event_type , pg_stat_history_begin+(current_hour_diff * interval '1 hour') , pg_stat_history_end+(current_hour_diff * interval '1 hour') ) si koh\u00ebzgjatje\nFROM\n  activity_hist.archive_pg_stat_activity aa\nWHERE \n  timepoint MIDIS pg_stat_history_begin+(current_hour_diff * interval '1 hour') DHE pg_stat_history_end+(current_hour_diff * interval '1 hour') DHE backend_type = 'client backend' DHE wait_event_type IS NOT NULL \nGROUP BY wait_event_type\nORDER BY 2 DESC<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+-----+------------------------------+--------------------+--------------------\n|    #|               wait_event_type|            duration|            % dbtime\n+-----+------------------------------+--------------------+--------------------\n|    1|                          Lock|            08:18:19|                6.07\n|    2|                            IO|            06:16:01|                4.58\n|    3|                       Timeout|            02:53:21|                2.11\n|    4|                        LWLock|            00:58:12|                0.71\n|    5|                        Client|            00:01:19|                0.02\n|    6|                           IPC|            00:00:04|                   0\n+-----+------------------------------+--------------------+--------------------\n<\/pre>\n<p>\nKoh\u00ebzgjatja e pritjeve, p\u00ebr proceset sistemore dhe k\u00ebrkesat e ve\u00e7anta.<\/p>\n<h3>PRITJET P\u00cbR PROCESET SISTEMORE<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">ZGJOJ \n  lloj_backend , emri_dat , tipi_eventeve_pret , eventi_pret , merr_backend_type_waiting_duration( lloj_backend , tipi_eventeve_pret , eventi_pret , pg_stat_history_begin+(ndryshimi_i_ores_sektorial * interval '1 ore') , pg_stat_history_end+(ndryshimi_i_ores_sektorial * interval '1 ore') ) si koh\u00ebzgjatje \nPREJ \n  aktivitet_hist.archive_pg_stat_activity aa\nKU \n  pika_t\u00eb_koh\u00ebs ND\u00cbRKOH q\u00eb pg_stat_history_begin+(ndryshimi_i_ores_sektorial * interval '1 ore') DHE pg_stat_history_end+(ndryshimi_i_ores_sektorial * interval '1 ore') DHE lloj_backend != 'klient_backend' DHE tipi_eventeve_pret IS NOT NULL \nGRUPI NGA lloj_backend , emri_dat , tipi_eventeve_pret , eventi_pret\nRENDIT sipas 5 ZONA<\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+-----+-----------------------------+----------+--------------------+----------------------+--------------------\n|    #|                 backend_type|    dbname|     wait_event_type|            wait_event|            duration\n+-----+-----------------------------+----------+--------------------+----------------------+--------------------\n|    1| lanse logjike replikuese    |          |            Aktivitet|   LogjikaLauncherMain|            10:43:28\n|    2|          lanse autovakuumi    |          |            Aktivitet|        AutoVacuumMain|            10:42:49\n|    3|                    walshkrues  |          |            Aktivitet|         WalWriterMain|            10:28:53\n|    4|                 kontrolluesi    |          |            Aktivitet|      CheckpointerMain|            10:23:50\n|    5|            shkruesi n\u00eb sfond   |          |            Aktivitet|          BgWriterMain|            09:11:59\n|    6|            shkruesi n\u00eb sfond   |          |            Aktivitet|     BgWriterHibernate|            01:37:46\n|    7|              punonj\u00ebs paralel   |      tdb1|                  IO|          BufFileWrite|            00:02:35\n|    8|              punonj\u00ebs paralel   |      tdb1|              LWLock|        buffer_mapping|            00:01:41\n|    9|              punonj\u00ebs paralel   |      tdb1|                  IO|          DataFileRead|            00:01:22\n|   10|              punonj\u00ebs paralel   |      tdb1|                  IO|           BufFileRead|            00:00:59\n|   11|                    walshkrues  |          |                  IO|              WALWrite|            00:00:57\n|   12|              punonj\u00ebs paralel   |      tdb1|              LWLock|             buffer_io|            00:00:47\n|   13|            punonj\u00ebs autovakuumi |      tdb1|              LWLock|        buffer_mapping|            00:00:13\n|   14|            shkruesi n\u00eb sfond   |          |                  IO|         DataFileWrite|            00:00:12\n|   15|                 kontrolluesi    |          |                  IO|         DataFileWrite|            00:00:11\n|   16|                    walshkrues  |          |              LWLock|          WALWriteLock|            00:00:09\n|   17|                 kontrolluesi    |          |              LWLock|          WALWriteLock|            00:00:06\n|   18|            shkruesi n\u00eb sfond   |          |              LWLock|          WALWriteLock|            00:00:06\n|   19|                    walshkrues  |          |                  IO|          WALInitWrite|            00:00:02\n|   20|            punonj\u00ebs autovakuumi |      tdb1|              LWLock|          WALWriteLock|            00:00:02\n|   21|                    walshkrues  |          |                  IO|           WALInitSync|            00:00:02\n|   22|            punonj\u00ebs autovakuumi |      tdb1|                  IO|          DataFileRead|            00:00:01\n|   23|                 kontrolluesi    |          |                  IO| ControlFileSyncUpdate|            00:00:01\n|   24|            shkruesi n\u00eb sfond   |          |                  IO|              WALWrite|            00:00:01\n|   25|            shkruesi n\u00eb sfond   |          |                  IO|         DataFileFlush|            00:00:01\n|   26|                 kontrolluesi    |          |                  IO|         SLRUFlushSync|            00:00:01\n|   27|            punonj\u00ebs autovakuumi |      tdb1|                  IO|              WALWrite|            00:00:01\n|   28|                 kontrolluesi    |          |                  IO|          DataFileSync|            00:00:01\n+-----+-----------------------------+----------+--------------------+----------------------+--------------------<\/pre>\n<p><\/p>\n<h3>PRITJET P\u00cbR SQL \u2014 pritjet p\u00ebr k\u00ebrkesa t\u00eb ve\u00e7anta sipas queryid<\/h3>\n<p>\n<b class=\"spoiler_title\">K\u00ebrkes\u00eb<\/b><\/p>\n<pre><code class=\"pgsql\">Zgjidhni \nqueryid, datname, wait_event_type, wait_event, get_query_waiting_duration(queryid, wait_event_type, wait_event, pg_stat_history_begin+(current_hour_diff * interval '1 hour'), pg_stat_history_end+(current_hour_diff * interval '1 hour')) si durat\u00eb \nFROM \n  activity_hist.archive_pg_stat_activity aa\nWHERE \n  timepoint NGA pg_stat_history_begin+(current_hour_diff * interval '1 hour') DHE pg_stat_history_end+(current_hour_diff * interval '1 hour') DHE backend_type = 'client backend' DHE wait_event_type NUK \u00cbSHT\u00cb NULL DHE queryid NUK \u00cbSHT\u00cb NULL \nGROUP BY queryid, datname, wait_event_type, wait_event\nORDER BY 1, 5 DESC <\/code><\/pre>\n<p>\n<b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+-----+-------------------------+----------+--------------------+--------------------+--------------------+--------------------\n|    #|                  queryid|    dbname|     wait_event_type|          wait_event|            waitings|               total\n|     |                         |          |                    |                    |            duration|            duration\n+-----+-------------------------+----------+--------------------+--------------------+--------------------+--------------------\n|    1|     -8247416849404883188|      tdb1|              Client|          ClientRead|            00:00:02|\n|    2|     -6572922443698419129|      tdb1|              Client|          ClientRead|            00:00:05|\n|    3|     -6572922443698419129|      tdb1|                  IO|        DataFileRead|            00:00:01|\n|    4|     -5917408132400665328|      tdb1|              Client|          ClientRead|            00:00:04|\n|    5|     -4091009262735781873|      tdb1|              Client|          ClientRead|            00:00:03|\n|    6|     -1473395109729441239|      tdb1|              Client|          ClientRead|            00:00:01|\n|    7|        28942442626229688|      tdb1|                  IO|        BufFileWrite|            00:01:34|            00:46:06\n|    8|        28942442626229688|      tdb1|              LWLock|      buffer_mapping|            00:01:05|            00:46:06\n|    9|        28942442626229688|      tdb1|                  IO|        DataFileRead|            00:00:44|            00:46:06\n|   10|        28942442626229688|      tdb1|                  IO|         BufFileRead|            00:00:37|            00:46:06\n|   11|        28942442626229688|      tdb1|              LWLock|           buffer_io|            00:00:35|            00:46:06\n|   12|        28942442626229688|      tdb1|              Client|          ClientRead|            00:00:05|            00:46:06\n|   13|        28942442626229688|      tdb1|                 IPC| MessageQueueReceive|            00:00:03|            00:46:06\n|   14|        28942442626229688|      tdb1|                 IPC|    BgWorkerShutdown|            00:00:01|            00:46:06\n|   15|       389015618226997618|      tdb1|                Lock|       transactionid|            03:55:09|            04:14:15\n|   16|       389015618226997618|      tdb1|                  IO|        DataFileRead|            03:23:09|            04:14:15\n|   17|       389015618226997618|      tdb1|              LWLock|      buffer_mapping|            00:12:09|            04:14:15\n|   18|       389015618226997618|      tdb1|              LWLock|           buffer_io|            00:10:18|            04:14:15\n|   19|       389015618226997618|      tdb1|                Lock|               tuple|            00:00:35|            04:14:15\n|   20|       389015618226997618|      tdb1|              LWLock|        WALWriteLock|            00:00:02|            04:14:15\n|   21|       389015618226997618|      tdb1|                  IO|       DataFileWrite|            00:00:01|            04:14:15\n|   22|       389015618226997618|      tdb1|              LWLock|        SyncScanLock|            00:00:01|            04:14:15\n|   23|       389015618226997618|      tdb1|              Client|          ClientRead|            00:00:01|            04:14:15\n|   24|       734234407411547467|      tdb1|              Client|          ClientRead|            00:00:11|\n|   25|       734234407411547467|      tdb1|              LWLock|      buffer_mapping|            00:00:05|\n|   26|       734234407411547467|      tdb1|                  IO|        DataFileRead|            00:00:02|\n|   27|      1237430309438971376|      tdb1|              LWLock|      buffer_mapping|            00:02:18|            02:45:40\n|   28|      1237430309438971376|      tdb1|                  IO|        DataFileRead|            00:00:27|            02:45:40\n|   29|      1237430309438971376|      tdb1|              Client|          ClientRead|            00:00:02|            02:45:40\n|   30|      2404820632950544954|      tdb1|              Client|          ClientRead|            00:00:01|\n|   31|      2515308626622579467|      tdb1|              Client|          ClientRead|            00:00:02|\n|   32|      4710212362688288619|      tdb1|              LWLock|      buffer_mapping|            00:03:08|            02:18:21\n|   33|      4710212362688288619|      tdb1|                  IO|        DataFileRead|            00:00:22|            02:18:21\n|   34|      4710212362688288619|      tdb1|              Client|          ClientRead|            00:00:06|            02:18:21\n|   35|      4710212362688288619|      tdb1|              LWLock|           buffer_io|            00:00:02|            02:18:21\n|   36|      9150846928388977274|      tdb1|                  IO|        DataFileRead|            00:01:19|\n|   37|      9150846928388977274|      tdb1|              LWLock|      buffer_mapping|            00:00:34|\n|   38|      9150846928388977274|      tdb1|              Client|          ClientRead|            00:00:10|\n|   39|      9150846928388977274|      tdb1|              LWLock|           buffer_io|            00:00:01|\n+-----+-------------------------+----------+--------------------+--------------------+--------------------+--------------------<\/pre>\n<p><\/p>\n<h3>STATISTIKAT E KLIENT\u00cbVE SQL \u2014 K\u00cbRKESAT M\u00cb T\u00cb M\u00cbDHA<\/h3>\n<p>\nK\u00ebrkesat p\u00ebr t\u00eb marr\u00eb, p\u00ebrs\u00ebri, jan\u00eb banale dhe p\u00ebr t\u00eb kursyer hap\u00ebsir\u00eb, nuk jan\u00eb paraqitur. <\/p>\n<p><b class=\"spoiler_title\">Shembuj<\/b><\/p>\n<pre>+------------------------------------------------------------------------------------\n| SQL i KLIENTIT sipas Koh\u00ebs s\u00eb Kalimit\n+--------------------+----------+----------+----------+----------+----------+--------------------\n|        koha e kaluar|     thirrje|  % koh\u00eb db|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+--------------------\n|            04:14:15|        19|       3.1|     10.83|     11.52|      tdb1|  389015618226997618\n|            02:45:40|       746|      2.02|      4.23|      0.08|      tdb1| 1237430309438971376\n|            02:18:21|       749|      1.69|      3.39|       0.1|      tdb1| 4710212362688288619\n|            00:46:06|       375|      0.56|      0.94|      0.41|      tdb1|   28942442626229688\n+--------------------+----------+----------+----------+----------+----------+--------------------\n| SQL i KLIENTIT sipas Koh\u00ebs s\u00eb CPU\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|            koha CPU|     thirrje|  % koh\u00eb db|koh\u00eb_totale|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|            02:59:49|        19|       3.1|  04:14:15|     10.83|     11.52|      tdb1|  389015618226997618\n|            01:10:12|       746|      2.02|  02:45:40|      4.23|      0.08|      tdb1| 1237430309438971376\n|            00:56:15|       749|      1.69|  02:18:21|      3.39|       0.1|      tdb1| 4710212362688288619\n|            00:15:35|       375|      0.56|  00:46:06|      0.94|      0.41|      tdb1|   28942442626229688\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n| SQL i KLIENTIT sipas Koh\u00ebs s\u00eb Pritjes s\u00eb I\/O\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|        koha io_wait|     thirrje|  % koh\u00eb db|koh\u00eb_totale|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|            03:23:10|        19|       3.1|  04:14:15|     10.83|     11.52|      tdb1|  389015618226997618\n|            00:02:54|       375|      0.56|  00:46:06|      0.94|      0.41|      tdb1|   28942442626229688\n|            00:00:27|       746|      2.02|  02:45:40|      4.23|      0.08|      tdb1| 1237430309438971376\n|            00:00:22|       749|      1.69|  02:18:21|      3.39|       0.1|      tdb1| 4710212362688288619\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n| SQL i KLIENTIT sipas Leximeve t\u00eb Buffers t\u00eb Ndara\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|       lexime buffers|     thirrje|  % koh\u00eb db|koh\u00eb_totale|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|          1056388566|        19|       3.1|  04:14:15|     10.83|     11.52|      tdb1|  389015618226997618\n|            11709251|       375|      0.56|  00:46:06|      0.94|      0.41|      tdb1|   28942442626229688\n|             3439004|       746|      2.02|  02:45:40|      4.23|      0.08|      tdb1| 1237430309438971376\n|             3373330|       749|      1.69|  02:18:21|      3.39|       0.1|      tdb1| 4710212362688288619\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n| SQL i KLIENTIT sipas Koh\u00ebs s\u00eb Leximeve t\u00eb Diskut\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|           koha e leximit|     thirrje|  % koh\u00eb db|koh\u00eb_totale|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|            02:16:30|        19|       3.1|  04:14:15|     10.83|     11.52|      tdb1|  389015618226997618\n|            00:04:50|       375|      0.56|  00:46:06|      0.94|      0.41|      tdb1|   28942442626229688\n|            00:01:10|       749|      1.69|  02:18:21|      3.39|       0.1|      tdb1| 4710212362688288619\n|            00:00:57|       746|      2.02|  02:45:40|      4.23|      0.08|      tdb1| 1237430309438971376\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n| SQL i KLIENTIT sipas Ekzekutimeve\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|               thirrje|      rreshta|  % koh\u00eb db|koh\u00eb_totale|     % CPU|      % IO|    emri_db|             id_k\u00ebrkese\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------\n|                 749|       749|      1.69|  02:18:21|      3.39|       0.1|      tdb1| 4710212362688288619\n|                 746|       746|      2.02|  02:45:40|      4.23|      0.08|      tdb1| 1237430309438971376\n|                 375|         0|      0.56|  00:46:06|      0.94|      0.41|      tdb1|   28942442626229688\n|                  19|        19|       3.1|  04:14:15|     10.83|     11.52|      tdb1|  389015618226997618\n+--------------------+----------+----------+----------+----------+----------+----------+--------------------<\/pre>\n<p><\/p>\n<h2>P\u00ebrfundimi<\/h2>\n<p>\nDuke p\u00ebrdorimi i k\u00ebrkesave t\u00eb paraqitura dhe raportimeve t\u00eb marra, mund t\u00eb kemi nj\u00eb pasqyr\u00eb m\u00eb t\u00eb plot\u00eb p\u00ebr analiz\u00ebn dhe zgjidhjen e problemeve t\u00eb degradimit t\u00eb performanc\u00ebs s\u00eb k\u00ebrkesave t\u00eb ve\u00e7anta dhe t\u00eb gjith\u00ebsis\u00eb s\u00eb klas\u00ebs, n\u00eb t\u00ebr\u00ebsi.<\/p>\n<h2>Zhvillimi<\/h2>\n<p>\nPlani i zhvillimit \u00ebsht\u00eb si m\u00eb posht\u00eb:<\/p>\n<ul>\n<li>T\u00eb plot\u00ebsohet raporti me historin\u00eb e bllokimeve. K\u00ebrkesat jan\u00eb n\u00eb testim dhe do t\u00eb paraqiten s\u00eb shpejti.<\/li>\n<li>T\u00eb p\u00ebrdoret zgjerimi TimescaleDB p\u00ebr ruajtjen e historis\u00eb pg_stat_activity dhe pg_locks.<\/li>\n<li>P\u00ebrgatitni nj\u00eb zgjidhje grupore n\u00eb github p\u00ebr shp\u00ebrndarjen masive n\u00eb bazat e t\u00eb dh\u00ebnave n\u00eb prodhim.<\/li>\n<\/ul>\n<p>\nVazhdon\u2026<br \/>\n<br \/>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467575\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &#171;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u2014 \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f pg_stat_activity. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u044b \u0438 \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-38196","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u2014 \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f pg_stat_activity. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u044b \u0438 \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f.\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0418\u0441\u0442\u043e\u0440\u0438\u044f\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0432 PostgreSQL | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u2014 \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f pg_stat_activity. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u044b \u0438 \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f.\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0418\u0441\u0442\u043e\u0440\u0438\u044f\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:22:13+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:22:13+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Nj\u00eb nga metodat p\u00ebr t\u00eb marr\u00eb profilin e ngarkes\u00ebs s\u00eb pun\u00ebs dhe historin\u00eb e pritjeve n\u00eb PostgreSQL | ProHoster","description":"Vazhda e artikullit \"P\u00ebrpjekja p\u00ebr t\u00eb krijuar nj\u00eb ekuivalent t\u00eb ASH p\u00ebr PostgreSQL\". N\u00eb artikull do t\u00eb shqyrtohet dhe do t\u00eb tregohet p\u00ebrmes k\u00ebrkesave specifike dhe shembujve \u2014 cila informacion i dobish\u00ebm mund t\u00eb merret me an\u00eb t\u00eb historis\u00eb s\u00eb paraqitjes pg_stat_activity. Paralajm\u00ebrim. P\u00ebr shkak t\u00eb novitetit t\u00eb tem\u00ebs dhe p\u00ebrfundimit t\u00eb periudh\u00ebs s\u00eb testimit, artikulli mund t\u00eb p\u00ebrmbaj\u00eb gabime. Kritik\u00eb dhe v\u00ebrejtje jan\u00eb gjithmon\u00eb t\u00eb mir\u00ebpritura dhe t\u00eb pritura.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0432 PostgreSQL | ProHoster","og:description":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 ASH \u0434\u043b\u044f PostgreSQL &quot;. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u2014 \u043a\u0430\u043a\u0443\u044e \u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f pg_stat_activity. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0435\u043c\u044b \u0438 \u043d\u0435\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442\u0441\u044f.\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0418\u0441\u0442\u043e\u0440\u0438\u044f","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/odin-iz-metodov-polucheniya-profilya-rabochej-nagruzki-i-istorii-ozhidanij-v-postgresql","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:22:13+00:00","article:modified_time":"2019-10-31T19:22:13+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"38196","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 20:52:50","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:13:23","updated":"2026-01-23 20:52:50"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/38196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=38196"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/38196\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=38196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=38196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=38196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}