2 postgresql identical rds instances and one is significantly slowerPostgreSQL 9.2 (PostGIS) performance...

3D buried view in Tikz

What does "don't have a baby" imply or mean in this sentence?

Was the Soviet N1 really capable of sending 9.6 GB/s of telemetry?

Whats happened with already installed GNOME apps if I install and run KDE to Ubuntu 18.04?

Protagonist constantly has to have long words explained to her. Will this get tedious?

Is it possible to detect 100% of SQLi with a simple regex?

Does しかたない imply disappointment?

What is an explicit bijection in combinatorics?

Is the tritone (A4 / d5) still banned in Roman Catholic music?

Is there a configuration of the 8-puzzle where locking a tile makes it harder?

What's the meaning of #0?

Is it possible to narrate a novel in a faux-historical style without alienating the reader?

Can a planet be tidally unlocked?

What is the smallest molar volume?

What does @ mean in a hostname in DNS configuration?

How can I persuade an unwilling soul to become willing?

Sets which are both Sum-free and Product-free.

How can I prep for the Curse of Strahd adventure effectively?

Minimum Viable Product for RTS game?

Distribution of sum of independent exponentials with random number of summands

Do the speed limit reductions due to pollution also apply to electric cars in France?

How do I make my single-minded character more interested in the main story?

Why is quixotic not Quixotic (a proper adjective)?

How do I avoid the "chosen hero" feeling?



2 postgresql identical rds instances and one is significantly slower


PostgreSQL 9.2 (PostGIS) performance problemHow can I speed up a Postgres query containing lots of Joins with an ILIKE conditionpostgres explain plan with giant gaps between operationsSlow fulltext search due to wildly inaccurate row estimatespostgresql 9.2 hash join issueImprove UPDATE performance on big tableSorting killing my postgresql queryPostgreSQL query is slow when return LineString dataWhy is this query with WHERE, ORDER BY and LIMIT so slow?Performance difference in accessing differrent columns in a Postgres Table













0















I have 2 instances of free tier rds postgresql db.t2.micro on same zone us-west2 region on 2 different accounts, using defaults at creation, Original and Copy.



Original is significantly slower than Copy.



I created a single table on the Copy using pg_dump / pg_restore after one contained on the Original which contains 100s of tables.



One that one table toto that interests me, that lives both on Original and Copy, I got a query that runs in 4s on Original and 172ms on the Copy.
I thought as an index issue at first, that table contains only one.



I did a VACCUM FULL, REINDEX table, REINDEX index to no avail.



I'm unable to get the slightest idea as to why there is such a massive discrepancy, nor have a sense as to where to begin to look at:



the only differences between the 2 instances of the db are:




  1. the Copy has only one table and the Original has a lot of them, I'm unaware that it could lead to such a massive penalty but I'm no db pro


  2. the table in question in Original contains one supplemental column I filled, but I can't say that this lead to the difference in performance



explain on the Copy



Sort  (cost=51484.50..51484.50 rows=1 width=80) (actual time=172.788..172.789 rows=1 loops=1)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Sort Key: toto."TICKER"
Sort Method: quicksort Memory: 25kB
-> Gather (cost=1000.00..51484.49 rows=1 width=80) (actual time=162.039..172.854 rows=1 loops=1)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on public.toto (cost=0.00..50484.39 rows=1 width=80) (actual time=161.547..164.635 rows=0 loops=3)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
Rows Removed by Filter: 196468
Worker 0: actual time=159.843..159.843 rows=0 loops=1
Worker 1: actual time=162.985..162.986 rows=0 loops=1
Planning time: 0.118 ms
Execution time: 172.894 ms



the same on Original



Sort  (cost=49649.78..49649.78 rows=1 width=80) (actual time=4532.986..4532.987 rows=1 loops=1)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Sort Key: toto."TICKER"
Sort Method: quicksort Memory: 25kB
-> Gather (cost=1000.00..49649.77 rows=1 width=80) (actual time=4531.345..4533.023 rows=1 loops=1)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on public.toto (cost=0.00..48649.67 rows=1 width=80) (actual time=4419.506..4528.946 rows=0 loops=3)
Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
Rows Removed by Filter: 196468
Worker 0: actual time=4198.182..4526.499 rows=1 loops=1
Worker 1: actual time=4529.205..4529.205 rows=0 loops=1
Planning time: 0.121 ms
Execution time: 4533.065 ms









share







New contributor




euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I have 2 instances of free tier rds postgresql db.t2.micro on same zone us-west2 region on 2 different accounts, using defaults at creation, Original and Copy.



    Original is significantly slower than Copy.



    I created a single table on the Copy using pg_dump / pg_restore after one contained on the Original which contains 100s of tables.



    One that one table toto that interests me, that lives both on Original and Copy, I got a query that runs in 4s on Original and 172ms on the Copy.
    I thought as an index issue at first, that table contains only one.



    I did a VACCUM FULL, REINDEX table, REINDEX index to no avail.



    I'm unable to get the slightest idea as to why there is such a massive discrepancy, nor have a sense as to where to begin to look at:



    the only differences between the 2 instances of the db are:




    1. the Copy has only one table and the Original has a lot of them, I'm unaware that it could lead to such a massive penalty but I'm no db pro


    2. the table in question in Original contains one supplemental column I filled, but I can't say that this lead to the difference in performance



    explain on the Copy



    Sort  (cost=51484.50..51484.50 rows=1 width=80) (actual time=172.788..172.789 rows=1 loops=1)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Sort Key: toto."TICKER"
    Sort Method: quicksort Memory: 25kB
    -> Gather (cost=1000.00..51484.49 rows=1 width=80) (actual time=162.039..172.854 rows=1 loops=1)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Workers Planned: 2
    Workers Launched: 2
    -> Parallel Seq Scan on public.toto (cost=0.00..50484.39 rows=1 width=80) (actual time=161.547..164.635 rows=0 loops=3)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
    Rows Removed by Filter: 196468
    Worker 0: actual time=159.843..159.843 rows=0 loops=1
    Worker 1: actual time=162.985..162.986 rows=0 loops=1
    Planning time: 0.118 ms
    Execution time: 172.894 ms



    the same on Original



    Sort  (cost=49649.78..49649.78 rows=1 width=80) (actual time=4532.986..4532.987 rows=1 loops=1)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Sort Key: toto."TICKER"
    Sort Method: quicksort Memory: 25kB
    -> Gather (cost=1000.00..49649.77 rows=1 width=80) (actual time=4531.345..4533.023 rows=1 loops=1)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Workers Planned: 2
    Workers Launched: 2
    -> Parallel Seq Scan on public.toto (cost=0.00..48649.67 rows=1 width=80) (actual time=4419.506..4528.946 rows=0 loops=3)
    Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
    Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
    Rows Removed by Filter: 196468
    Worker 0: actual time=4198.182..4526.499 rows=1 loops=1
    Worker 1: actual time=4529.205..4529.205 rows=0 loops=1
    Planning time: 0.121 ms
    Execution time: 4533.065 ms









    share







    New contributor




    euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have 2 instances of free tier rds postgresql db.t2.micro on same zone us-west2 region on 2 different accounts, using defaults at creation, Original and Copy.



      Original is significantly slower than Copy.



      I created a single table on the Copy using pg_dump / pg_restore after one contained on the Original which contains 100s of tables.



      One that one table toto that interests me, that lives both on Original and Copy, I got a query that runs in 4s on Original and 172ms on the Copy.
      I thought as an index issue at first, that table contains only one.



      I did a VACCUM FULL, REINDEX table, REINDEX index to no avail.



      I'm unable to get the slightest idea as to why there is such a massive discrepancy, nor have a sense as to where to begin to look at:



      the only differences between the 2 instances of the db are:




      1. the Copy has only one table and the Original has a lot of them, I'm unaware that it could lead to such a massive penalty but I'm no db pro


      2. the table in question in Original contains one supplemental column I filled, but I can't say that this lead to the difference in performance



      explain on the Copy



      Sort  (cost=51484.50..51484.50 rows=1 width=80) (actual time=172.788..172.789 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Sort Key: toto."TICKER"
      Sort Method: quicksort Memory: 25kB
      -> Gather (cost=1000.00..51484.49 rows=1 width=80) (actual time=162.039..172.854 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Workers Planned: 2
      Workers Launched: 2
      -> Parallel Seq Scan on public.toto (cost=0.00..50484.39 rows=1 width=80) (actual time=161.547..164.635 rows=0 loops=3)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
      Rows Removed by Filter: 196468
      Worker 0: actual time=159.843..159.843 rows=0 loops=1
      Worker 1: actual time=162.985..162.986 rows=0 loops=1
      Planning time: 0.118 ms
      Execution time: 172.894 ms



      the same on Original



      Sort  (cost=49649.78..49649.78 rows=1 width=80) (actual time=4532.986..4532.987 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Sort Key: toto."TICKER"
      Sort Method: quicksort Memory: 25kB
      -> Gather (cost=1000.00..49649.77 rows=1 width=80) (actual time=4531.345..4533.023 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Workers Planned: 2
      Workers Launched: 2
      -> Parallel Seq Scan on public.toto (cost=0.00..48649.67 rows=1 width=80) (actual time=4419.506..4528.946 rows=0 loops=3)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
      Rows Removed by Filter: 196468
      Worker 0: actual time=4198.182..4526.499 rows=1 loops=1
      Worker 1: actual time=4529.205..4529.205 rows=0 loops=1
      Planning time: 0.121 ms
      Execution time: 4533.065 ms









      share







      New contributor




      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have 2 instances of free tier rds postgresql db.t2.micro on same zone us-west2 region on 2 different accounts, using defaults at creation, Original and Copy.



      Original is significantly slower than Copy.



      I created a single table on the Copy using pg_dump / pg_restore after one contained on the Original which contains 100s of tables.



      One that one table toto that interests me, that lives both on Original and Copy, I got a query that runs in 4s on Original and 172ms on the Copy.
      I thought as an index issue at first, that table contains only one.



      I did a VACCUM FULL, REINDEX table, REINDEX index to no avail.



      I'm unable to get the slightest idea as to why there is such a massive discrepancy, nor have a sense as to where to begin to look at:



      the only differences between the 2 instances of the db are:




      1. the Copy has only one table and the Original has a lot of them, I'm unaware that it could lead to such a massive penalty but I'm no db pro


      2. the table in question in Original contains one supplemental column I filled, but I can't say that this lead to the difference in performance



      explain on the Copy



      Sort  (cost=51484.50..51484.50 rows=1 width=80) (actual time=172.788..172.789 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Sort Key: toto."TICKER"
      Sort Method: quicksort Memory: 25kB
      -> Gather (cost=1000.00..51484.49 rows=1 width=80) (actual time=162.039..172.854 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Workers Planned: 2
      Workers Launched: 2
      -> Parallel Seq Scan on public.toto (cost=0.00..50484.39 rows=1 width=80) (actual time=161.547..164.635 rows=0 loops=3)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
      Rows Removed by Filter: 196468
      Worker 0: actual time=159.843..159.843 rows=0 loops=1
      Worker 1: actual time=162.985..162.986 rows=0 loops=1
      Planning time: 0.118 ms
      Execution time: 172.894 ms



      the same on Original



      Sort  (cost=49649.78..49649.78 rows=1 width=80) (actual time=4532.986..4532.987 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Sort Key: toto."TICKER"
      Sort Method: quicksort Memory: 25kB
      -> Gather (cost=1000.00..49649.77 rows=1 width=80) (actual time=4531.345..4533.023 rows=1 loops=1)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Workers Planned: 2
      Workers Launched: 2
      -> Parallel Seq Scan on public.toto (cost=0.00..48649.67 rows=1 width=80) (actual time=4419.506..4528.946 rows=0 loops=3)
      Output: "TICKER", "ISIN", "SOURCE", "TICKER", "SCORE", "TIME_STAMP_SOURCE"
      Filter: ((toto."TIME_STAMP_SOURCE" = '2019-02-14'::text) AND (((toto."TICKER")::text = 'AAOI US Equity'::text) OR (toto."ISIN" = 'AAOI US Equity'::text)))
      Rows Removed by Filter: 196468
      Worker 0: actual time=4198.182..4526.499 rows=1 loops=1
      Worker 1: actual time=4529.205..4529.205 rows=0 loops=1
      Planning time: 0.121 ms
      Execution time: 4533.065 ms







      postgresql amazon-rds postgresql-performance





      share







      New contributor




      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      euri10euri10

      1011




      1011




      New contributor




      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      euri10 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          euri10 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230505%2f2-postgresql-identical-rds-instances-and-one-is-significantly-slower%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          euri10 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          euri10 is a new contributor. Be nice, and check out our Code of Conduct.













          euri10 is a new contributor. Be nice, and check out our Code of Conduct.












          euri10 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230505%2f2-postgresql-identical-rds-instances-and-one-is-significantly-slower%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          ORA-01691 (unable to extend lob segment) even though my tablespace has AUTOEXTEND onORA-01692: unable to...

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          Circunscripción electoral de Guipúzcoa Referencias Menú de navegaciónLas claves del sistema electoral en...