Re: Query Performance question - Mailing list pgsql-performance

From Magers, James
Subject Re: Query Performance question
Date
Msg-id 3658dc09a48248edbb137093cf0b3029@CO2PR07MB601.namprd07.prod.outlook.com
Whole thread Raw
In response to Re: Query Performance question  ("Tomas Vondra" <tv@fuzzy.cz>)
List pgsql-performance
Thank you Tomas.  I did execute the queries against a dataset that was representative of what we expect the production
datasetto have.  By higher volume I meant more transactions happening against the data,  We would expect the data size
toincrease over time and when we executed against a dataset that was about 4x larger the index scan was selected to
performthe lookup versus the bitmap heap scan.  The scan of the both the smaller and larger datasets were returning in
similartimes between the two groups of tests.  This is part of the reason that I was thinking that the bitmap heap scan
maynot be as efficient since 4 times the data returned in just a little more time using the index scan.
 


Thank you,
James

-----Original Message-----
From: Tomas Vondra [mailto:tv@fuzzy.cz] 
Sent: Monday, July 14, 2014 12:29 PM
To: Magers, James
Cc: Tomas Vondra; Thomas Kellerer; pgsql-performance@postgresql.org
Subject: RE: [PERFORM] Query Performance question

On 14 Červenec 2014, 18:02, Magers, James wrote:
> Tomas,
>
> Thank you for the recommendation.  In this case, The bitmap scan runs
> quite quickly, however in production were data may or may not be cached
> and at higher volumes I am trying to ensure the process will continue to
> execute efficiently and reduce the impact of the process on other
> processes running against the database.

That's why it's important to do the testing with representative amount of
data. Testing the queries on significantly reduced dataset is pointless,
because the optimizer will do different decisions.

> My assessment is based on my experiences with the scans.  Does your
> experience provide you with a different assessment of the scan types and
> how efficient they may be?

No. Because I don't have your data. And it seems that your assessment is
based on experience with dataset that's very different from your expected
production dataset, which means the experience is not directly applicable.
The optimizer considers the size of the dataset when choosing the plan.

regards
Tomas


pgsql-performance by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Query Performance question
Next
From: Mark Kirkwood
Date:
Subject: Re: 60 core performance with 9.3