Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: Performance...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 4008 of 4352
Post > Topic >>

Re: Performance of the Materialize operator in a query plan

by rosenfel@[EMAIL PROTECTED] (Viktor Rosenfeld) Apr 24, 2008 at 04:31 PM

Hi Tom,

>> The cost of the inner-most Nested Loop is 27 ms, but the total cost  
>> of
>> the Materialize operator is 666 ms (9250 loops * 0.072 ms per
>> iteration).  So, Materialize introduces more than 10x overhead.
>
> Not hardly.  Had the Materialize not been there, we'd have executed
> the inner nestloop 9250 times, for a total cost of 9250 * 27ms.
> (Actually it might have been less due to cache effects, but still
> a whole lot more than 0.072 per iteration.)

I realize that Materialize saves a big amount of time in the grand  
scheme, but I'm still wondering about the descrepancy between the  
total cost of Materialize and the contained Nested Loop.

> These numbers say that it's taking the Materialize about 120 microsec
> per row returned, which seems a bit high to me considering that the
> data is just sitting in a tuplestore.  I surmise that you are using
> a machine with slow gettimeofday() and that's causing the measurement
> overhead to be high.

Do you mean, that the overhead is an artefact of timing the query?  In  
that case, the query should run faster than its evaluation with  
EXPLAIN ANALYZE, correct?

Is there a way to test this assumption regarding the speed of  
gettimeofday?  I'm on a Macbook and have no idea about the performance  
of its implementation.

Cheers,
Viktor

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 5 Posts in Topic:
Performance of the Materialize operator in a query plan
rosenfel@[EMAIL PROTECTED  2008-04-21 13:07:22 
Re: Performance of the Materialize operator in a query plan
tgl@[EMAIL PROTECTED] (T  2008-04-21 10:44:49 
Re: Performance of the Materialize operator in a query plan
rosenfel@[EMAIL PROTECTED  2008-04-24 16:31:58 
Re: Performance of the Materialize operator in a query plan
lists@[EMAIL PROTECTED]   2008-04-24 19:05:14 
Re: Performance of the Materialize operator in a query plan
rosenfel@[EMAIL PROTECTED  2008-04-27 21:02:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 20:15:33 CDT 2008.