Skip navigation
2684 Views 1 Reply Latest reply: Feb 22, 2012 2:17 PM by nickg RSS
Shaun Crampton Rookie 162 posts since
Dec 13, 2010
Currently Being Moderated

Feb 22, 2012 8:24 AM

Query Concurrency Performance

Hi,

 

Ok so lets assume two queries (different ones) are kicked off by the same user and are the only users of the database. I initially assume that each user would get 50% of the machine which would translate to the queries running 2x longer than their solo runs given the same conditions.

 

From what i am expereincing is a query that come back in a few seconds on its own runs for 100x longer when run with the other query which is a CTAS of a union of the one table used in the other "short" query".

 

Thanks,

 

Shaun

  • nickg Active Enzee 248 posts since
    Mar 16, 2011
    Currently Being Moderated
    1. Feb 22, 2012 2:17 PM (in response to Shaun Crampton)
    Re: Query Concurrency Performance

    The system will interleave queries over time, but the granularity is at the snippet level.  When a query is received, it is compiled on the host and broken down into a series of steps (snippets).  When there are multiple concurrent queries running, the scheduler will figure out which query's snippet runs next (based on a variety of strategies and user controlled parameters).  However, once a snippet is sent to the SPUs, the snippet runs to completion.  One would assume the CTAS query has a step that moves a lot of data and got to the spus before the other query was done with all of its steps. This delayed the completion of the smaller query.

     

    The fact that both queries access the same table is coincidental and has no detrimental effect on the clock times.

More Like This

  • Retrieving data ...

Bookmarked By (0)