Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

NRQL: Tracking specific duration response for one End point



I “think” i’m mostly there. But the facets i need to break out the duration must be in 100ms increments. For instance if all fall between 0 and 100ms. There should only be one bucket with all transactions. Can anyone help me with the syntax?

SELECT count(*) from Transaction, PageView where appName = 'API' and name in ('Web/Spring/Controller/getStuff') and transactionType LIKE 'Web' FACET buckets(duration, 100, 25)


@jason.smisek If you set your duration upper limit to 1 second and divide it into 10 buckets, I think that should do the trick.

SELECT count(*) from Transaction, PageView FACET buckets(duration, 1, 10)


This was really helpful. Gets me 90% there. But unfortunately i need a break out of 100ms all the way up to 30 second timeout. :frowning:


@jason.smisek I haven’t had a chance to test it yet, but I would assume that changing the duration upper limit and bucket count should allow this.

i.e. SELECT count(*) FROM Transaction, PageView FACET buckets(duration, 30, 300) LIMIT 300


I’m not sure I would find combining transaction and pageview metrics together to be useful. I’d really want to see these separate normally. I actually do to the trouble to compare pageviews etc that correlate to specific transactions to help locate issues shown by large deltas.

I think you will find there is a limit of 100 buckets. Also, the bucket names will be messy due to the precision of your data.

This kind of thing can help you compare if you want this type of format.

SELECT filter(count(*), where name = 'Web/Spring/Controller/getStuff') as 'Transaction' , filter(count(*), where transactionType LIKE '%Web%') as 'Pageview' from Transaction, PageView where appName = 'API' FACET buckets(duration, 100, 25)

You can also do this kind of thing to bucket the event types:

SELECT filter(count(*), where eventtype() = 'Transaction' ) as 'Transaction', filter(count(*), where eventtype() = 'PageView') as 'Pageview' FROM Transaction, PageView where duration <= 30 FACET buckets(duration, 30, 100) limit 1000

You can limit your query to certain duration ranges if you really need the granularity and range and hit the limits. 3 widgets…

The Histogram chart is also pretty useful, but not with that many buckets.


I found page view to just be something i crammed in there when trying things out. It actually has no relevant data to the information i’m looking to output. Removing it completely returns the same accurate. But limited results. Hope that helps with the comparison you mention.


So, if you really need it broken out in 100ms blocks you probably need to split it up. OR you can try tediously writing a Cases() statement with 300 sections… No idea if that would work. It might limit to 100 also.


Hi @jason.smisek just wondering if @6MM’s suggestions were able to help you solve this? :slight_smile: