logo

NJP

Tuning Solutions in Performance Analytics - Platform Analytics Academy - November 16th, 2022

Import · Nov 16, 2022 · video

[Music] foreign [Music] welcome to the platform analytics Academy session for November I have that date wrong it is actually November 16th just checking to make sure that everybody's awake Tara saw it as soon as she came in um it's all good I can't hear you Tara if you're talking too so um that's all right now I got you so we're gonna do things a little bit differently today we're actually going to have um we have content obviously to share and I will share all of that uh with some screenshots and some bullets and things like that but we thought that this one may be one that may be better to have a discussion around uh anytime that you talk about tuning uh we did uh tuning in reporting last year around this same time and then we thought about doing you know the performance analytics one um this time but we thought it might be better to have a conversation so uh we have quite a few slides to go through and uh Dan and Tara and myself and Adam may join uh here shortly and we may have some other uh panelists that show up as well is to just have conversations because again when it comes to tuning there are definitely things that we want and we recommend that you do but a lot of times it kind of just comes with experience of sort of what we've been through uh to kind of give you advice on things like that so again um we are on camera today so if you've never seen the three of us other than a picture how are you it's uh I wish we could apologize but who knows how that works uh but again so let's go ahead and get started so again as usual this is always for you um especially today we'll try to bring you some ideas that maybe that you never heard of some that you probably have heard of and some that you're actually doing and we really appreciate that as well um but you know to give you some understanding and practical guidance it is uh being recorded as usual it will be out on the um the Community page later on this afternoon as well as on our YouTube page this after uh this afternoon as well and Q a we still would will utilize the Q a so if you have questions as we're talking about something please make sure that you're utilized in the Q a uh rather than the chat some things come through chat but if we can get them all in the Q a it'd be better and if it is a situation where we need to unmute you and let you talk we're open to that um as well so um always want to make sure that we have this Safe Harbor I don't know that we'll talk about anything necessarily that uh relates to this but in case there is something that uh we do talk about please make sure that you don't make any buying decisions or anything that we have discussed or discussing uh today so um again my name is Thomas Davis and I have Tara and Dan as well like I said Adam um may be here and uh again there may be some other panelists I don't see them as of yet but uh this is who will be on the call today so again today we want to talk about uh tuning Solutions and maybe I should move this over a little bit uh tuning Solutions and performance analytics and you know this is something that um hopefully you're already thinking about hopefully you're already doing some things that um maybe you've had a conversation about or maybe there's already been another Community article or blog that's about it or maybe you've even been on another platform analytics uh call or a session that we've had where we've talked about similar things like this um but this is something that you should always be thinking about uh anytime that obviously you're doing anything with data you should definitely be thinking about these types of things to make things run more efficiently uh for whoever's uh viewing the things that you're doing inside of your platform so there we go so nobody wants this obviously this is not something that you see inside of servicenow it doesn't look like this you may see a circle but um but this is again this is something that is irritating no matter what you're in it doesn't matter inside of our platform or anything else we are uh we have become a um a generation of people that want it instantly so the more we can do that and give that to you at your fingertips as soon as possible that's what we want to try to do so um some things uh real high level here of some things that we'll kind of talk about some of these or most of these things today but just there's not enough room on this this particular slide of all the different tuning concerns that possibly are out there but we try to make sure that we give are given some very high levels but the very first one which we think is most important which you see in green is indexes right so if there's an opportunity to create an index uh you should definitely do that almost there's a lot I mean in a lot of indexes that we have already thought thought of in service now that are already created out of the box if it's a reference field there's already been an index that's been uh created on that uh but again there are certain situations where maybe um additional indexes need to be uh created so definitely always be thinking about that as much as you can when you get into your data has this been done and because indexes require an admin you might want to get with your admin to actually talk about what is out there especially if you're seeing something that is uh that you find to be slow and it's just a question that you should ask somebody hey is there an index on this particular field or or something of that nature so um well and I want to chime in there really quick um so also remember the inverse can be having too many indexes basically equal equals no indexes right so if you try to input everything then you've actually hosed yourself so you got to really think about um what you're looking to pull what's your top priority and who um understands the data maybe a little bit better than you do the way it's structured how things are related to each other so really sit down and have these conversations with your admin team to make sure that everybody's on the same page because if you just submit a request for an index not understanding what already exists out there um you might actually pose yourself even more because too many indexes like I said actually equals no indexes so something to think about when you're playing around with indexes um always if you're creating a new table or a database view that's the first question you want to ask is do I have the proper fields indexed and who can I ask about that who can I work with to get that structured I mean that's the number one thing you want to come out the gate with when working with a table and use yeah absolutely great Point uh Dan you had something yeah I want to add another I want to add a similar point to that too so uh because we're talking about indexes what you have can what let's say what you as a user say if you're building a report or a PA widget or an indicator Source the stuff you can actually do as a PA admin or EA power user what you have control over is also you know how you you know how you use those indexed fields in your query conditions so definitely make sure that you know that's uh we're talking about indexing we're talking about um leveraging those in in your actual conditions so that so your your fields that you're including in your database conditions are in your query conditions as much as possible make sure that those are fields that are indexed on your table that could also really help speed things up right yeah and we're going to talk about indexes a little bit more and and actually show some different thought processes on why indexes uh are important and and why you should be doing that but but this slide here is really just a a high level of some things that you should think about and you know uh always be thinking about the total number of Records on a table you know if you have a table that millions or possibly even billions of uh Records that are in that you know how are you going to query that how are you going to be able to you know uh as an exercise the number of records that match conditions are you gonna be able to put conditions in there to to make it a little bit more granular so you're not you know returning that many records um at one particular time because obviously the amount of records that are coming back obviously will uh you know go right over to how how often or how fast something is going to run so always be thinking about how many records are inside of a table and conditions you know if you can create an uh a condition or a filter um at any level that would reduce that then you should always be thinking about those as well and then the other thing too is um you know the periods I'm sorry you have some Tara no I was just gonna say um it's it seems like it's a no-brainer um filtering condition using filters using conditions which conditions are basic basically filters it seems like it's a no-brainer but you wouldn't believe the amount of times that people say that out to write a quick query because they just want to see what's in the table and they don't apply any filters or conditions and that'll literally sync your ship so it might seem like something Elementary but is an easy thing to overlook I've done it myself being like Oh I just want to see what's in this table really quick and I don't think about pulling like maybe the last week or you know just so I can see what kind of what data data is in the fields and what I'm working with where's there where is there noise um that's a good way to also fine-tune um your queries and apply filters and conditions is determining where noise what noise is it and noises any data that in that's in there that's garbage that you know is um something that needs to be overlooked it needs to be filtered out and the best way to do that is to write a quick query against a table making sure you're pulling you know maybe the last two weeks or something along those lines but uh just um not applying any sort of filter will definitely sync your ship so always think about what can I apply to that and then also how how can I filter out that noise because noise is um definitely something that'll host people right we always say garbage and garbage out but you have to filter out the garbage at the end of the day nobody has a pristine database unfortunately good comment from in the Q a from Phil and actually I was I I was gonna I meant to actually mention this as well if you have your own ideas too in these topic areas absolutely please do share them these uh Phil's comment as they could also use table I assume you meant table stats table stats to get parameters on your tables so you know you can actually determine where you've got you know where you because you you know a basic user is not going to know um you know how complex a table is necessarily off the top of their head so that's a that's also I think that that's a good that's a good pointer thank you Phil yeah thank you uh things real quick and then we'll we'll get to the next one is if you're using a database view what what tables are actually being accessed in that uh database View and how big are they right uh who has you know is it is it going to return is it gonna look at two tables that again have millions of records and you know can you can you apply um you know filtering conditions on the tables inside of the database View and things like that so again database views are something that an admin has to do so that's a conversation that you may want to have with you Adam unless you and an admin unless you are the actual admin and then the lastly the the query load you know are you optimizing as much as possible well also we're going to talk we're going to cover this in a little bit more detail but we talk about query load we're talking about um a lot of times indicator sources or how many reports you hit having the same table what you want to do is minimize how many of the same exact queries you're running the hit hit that and we'll talk about it a lot more when we get into sources and how to fine tune and optimize your sources but think about that because often times I've seen when I've gone to sit with a customer that they have the exact same query hitting the exact same table as their actual indicator almost like their indicator sources and their indicators match um and so when you're hitting and querying the table that many times with the same query you're putting an impact on your performance and so that's something to always think about is where can I reuse queries um and and optimize them so that they can be reused um using indicators instead of hitting especially with reports too right we got to think about that because so many people will hit the same table with the same query for a report you know hundreds of if not thousands of times a day yeah and it's a great point and it also kind of goes into something that we talk about a lot as well right is governance if you if you know that you have a particular indicator source that is giving you exactly what you you need then you know why not hit that instead of creating the same exact indicator Source again so really good point so let's see what we got and then one other um I guess kind of fundamental on this too because I think we're kind of talking at a level where I think we're just kind of assuming that everyone knows that we're talking about the difference between like reports versus a PA indicator type of the type of query so just declare you know for those just to make sure we got at least a basic Baseline they're definitely different concerns when we're talking about loading a real-time report that's a or just a table query on your on your dashboard versus putting a PA indicator on your dashboard there is there's concerns for the PA indicators that we'll talk about here and some of these have to do with that at but most of these are have more to do with the reports as they load on your dashboard and then P from a PA perspective it's when the collection jobs are running themselves so it's that that overnight time when the collection jobs are running we're talking about PA but we're talking about the real-time load of the dashboard we're just talking about the reports that are querying your your your active um transactional tables yeah and that's a great point and like I said last November we actually did the same thing and and it was directly about reports like you were talking about Dan and then I'll make sure that that link is in the community so if you if you weren't able to get to that one and you have a lot more questions about the reporting side of it you can definitely watch that one uh yeah that was a really good one as well just as a just as an example of that the total number of Records in a source table if we're talking about PA it doesn't matter at all in the dashboard it matters entire matters a lot for the running of the data collection the overnight data collection to get your scores but when you're actually loading the the widget for PA for PA indicator on your dashboard the total number of Records in the say in the indicator Source table makes zero difference it because it's all coming out of the PA scores table at that time yeah great point all right so let's see all right so uh we've already had you know some really great conversation already but but uh our idea today is we want to talk about sources both indicator and breakdown and you know some things that you can do there some tips uh look at the indicator level what can you do there and uh the widgets you know loading on dashboards how many how many should you have displayed how many should load automatically uh which is something that um I've seen plenty of questions on the community about and had plenty of conversations about that uh and then database views and database indexes we talked a little bit about that but we'll kind of show some stuff there and then filtering conditions you know are you um are you utilizing them as much as you possibly can and then utilizing scripts we'll talk a little bit about that as well so with that so let's talk about an indicator Source here real quick so if you don't know what an indicator source is so indicator sources are data sets consisting of filtered records from one table or a database you so what do we want our indicators um to report on or have the data have to then use it inside of a widget so we started at the indicator Source level and a couple of the things that we always try to tell people to think about or customers to think about when they're creating the indicator source and Tara already alluded to it uh one of the things is first of all go check and see if there's already one out there right if it's the same exact thing that you're going to do uh go out there and look and that's why I've always been a real stickler about descriptions like if there's a description field no matter where you're at inside of the platform and you can create a description you should help your fellow workers out and put that there so again if there's one out there and somebody's created a description and you say to yourself that's the exact same one that I need why not use that um usually the owner is there as well so if you need to reach out to them you can definitely do that say hey are you cool with me using it or whatnot but definitely search and take a look you had some Tara well I shouldn't say that's a really good point because we should be pushing that on almost every single slide that we touch or anything that we talk about today reiterate the fact that you should leverage descriptions with everything and then the reason is because you want to the best way to tune is to not repeat um you don't want to create an impact on your system just because you have something that everybody is trying to access in a slightly different way so you want to make sure that everyone's leveraging as much as possible the same when we talk about indicator sources and indicator sources and master pull that you pull from your database and then it comes into a PA table that gets stored we parse that out when we create the indicators and so the minimum if you can minimize the amount you do that Master pull of data and then do the parsing on the indicator level that is a a great way to enhance performance on your system and so you definitely want to be thinking about um minimizing that the indicator sources that are hitting the system with the same exact stuff and the best way to do it is to use those descriptions yeah and I think another thing too that should go without saying is the name right do you have unique names or are you just calling an indicator Source open incidents well okay if it's just open incidents and it is that you know then maybe that's it but if you if it needs to go a little bit further and there's something you need to create you should you should say that help help somebody out by you know giving it a really good name and description um that goes without saying anywhere inside the platform that it's available uh so the first exactly Phil you're absolutely right it makes users understand and use what it's already created so we couldn't could not say that more and we'll keep saying that throughout today's session uh one of the things that Thomas touched on was open incidents like obviously anything open or whatever is um part of um something that everybody wants to know and it's it's part of a key metric that is pushed out there and one of the things that we're going to touch on right now is using dates not States when it comes to using performance analytics and part of that means that you want to be able to understand what the state of your data was historically when you do those historic data pools and the only way to do that is to figure out okay on this day what was the what did I have open so was it open before today or closed after tomorrow or any situations like that we encourage you to use dates so that when you do your historic data pool it's as accurate as possible what it does is it goes out and it pulls the sys IDs of the records that match the criteria on that date if you use state in your query it will look at what the state is today so that's why we encourage the dates not States and I don't know if anyone else wants to chime in on that but I know that's a big thing that's a little bit different than some of this other technology that's out there today yeah that's just a whole different mindset of writing a query and that's why it's really important to think about am I writing this query for the purposes of collecting PA scores or am I writing this query for the purposes of getting a live pull a pull of the live data as it sits right at this instant so that yeah that you know that you want to make sure that you really make that distinction and you want to think about from which you have moving forward because once you pull data you have collected yours it's hard to go back in and make changes without re-pulling everything again so you want to kind of artfully map this out as to what exactly is what story am I trying to tell right we say that with everything when it comes to dashboard development anyways yeah great points another thing that I think can get um I don't want to use the words dangerous because I mean but it could go ahead go ahead if you have I mean if you have uh you know free-filled you know that that can be typed in uh description shortages whatever if you create a column or something inside of a table and it's a free form and you can do that utilizing those inside of sources can get you know um I know that there's situations where it needs to be done you know maybe there is something that you need to look for very specifically inside of a field and and if you know that you know maybe the table is not that big or whatnot um it's it's not going to hurt you as much but I think a good rule of thumb is to say to yourself if it's a free form field and I want to you know look for something in that um I don't know maybe you might want to think about a different a different way of pulling that information back I know that there's always situations that you can't avoid but if you can't avoid you know you know having a condition on a free-form string field we definitely recommend um you know avoiding that at all possible if you can then yeah that's that's just kind of the general philosophy too of how reporting about doing this work in the platform is very different than external types of reporting because we stress a lot is make sure that your Source data is set up correctly for you to be able to run these live reports on it or to be able to do the the grouping or the breakdowns that you need and make sure that your Source data so if all you're doing is the report end and you have no control over what's in the tables themselves then you need to go back to your admins and say Hey you know I'm running this query that right now the only way I can get my query is by running a con this field contains this string and that's taking 45 seconds for that query to run every time you know that that's a problem then you need to go back to your admins and say is there a way that can we make this can we make uh either a new field that maybe identifies this one specific element let's say that it contains a location name in the you know in the short description I've see actually I've seen that before can you do instead where we just add something that puts the location correctly in this in the record itself so it can just be a reference field I'm looking up against as opposed to using the contains because you'd be surprised how often how often we do see that definitely the next thing is utilizing report sources which I I find to be really great I think that they're a little bit underused I think they could be used a whole lot more and I and I'll use the same word that I referenced earlier to Tara is governance right I love the fact that a report Source can be created that your organization or whatnot I said this is this is how we are going to look at our data this is you know whether it be incident whatever it is you know to say okay this is what we're look this is what we uh will say that a closed incident is this is all the things that have to be there or whatnot and when you have a report Source you know uh and which are generated from creating a report it'll use that report source and then it'll collect the data so even though it used a report Source inside the source when you're once it's in the PA scores table then it's there like you know Dan was talking about earlier it's there and you've pulled it um you know obviously based on how often you pull your job will you know determine how up-to-date the information is but report sources could be utilized a lot more there's actually a Blog that I created a few years ago that I'll make sure that I put um inside of this uh as well in the community that gives you a lot of great information on uh report sources and and Tara you leaned up so I'm guessing you had yeah I was just going to say I almost wish that there was a way to force report sources as like the first step for any type any anyone who is in ever been in a role where you're a report admin team lead control and responsible of the source of Truth basically um I would almost encourage you to sit down with your admins and figure out a way to force force your team to leverage existing report sources first um instead of writing their own reports because when you're responsible for that source of Truth um you're able to filter out that noise you're able to fine-tune and customize your queries even with reporting um to minimize the amount of impact that folks are hitting your system with runaway queries and and things that they don't know or understand a lot of everybody has access to reporting for the most part and if they don't understand how the data and how it's structured you kind of get yourself in a situation where you want which you could just grab everyone at least I know when I used to have that role I want to be like no no I don't want you to do that don't do that yeah yeah exactly I know okay no no I'm sorry no I just saying I love it use it so Jane great question I think it's actually I was going to comment on that exact thing so Jane's question is is there a way to force that reports can only be built using report sources there is not currently a way to force that um that is something that I know that I know I know I've put in others have put in as as a feature request um but it's it's more difficult than than it would seem like but yes Gene I agree with that entirely a way but I wonder oh sorry a suggestion I got from a customer um a few months ago was a great idea and that is to have reports that tell you what reports are using reports that are are using and not using report sources so at least you have some sort of audit mechanism because you because you can do that you can create a report that says you know show me everything that's using a report source and everything that's not using a report source that can so that so it's not the perfect world that we want to get to with that feature request but it is but it's but I find it to uh Gene already do that excellent okay so but those are good um I wanted to come back to Phil and I actually feel I I set you up so you're allowed to talk if you want to because you had the comment about the querying using IF then else and I think we could comment on that but I think I'd like to hear you know if you have if you can speak to that in a little any any more detail about what you mean by that if you don't mind yeah sure um when a lot of times when you're you know you're doing reports or you're setting up um queries to run you know if whether it's a report source which I prefer to do or if you're doing a table um if you do an if then else to get your data to be filtered it's very consuming on the resources for your system and it's much better if you restrict it and I'm I'm drawing a blank right now on the name of the new term to use um for if then else it's it's it's a catchphrase and it just went out of my head but there's a way to to query specifically where you restrict it without going through all the records because if then else means I want to read every single record in this table and make a determination if it meets this criteria then add it if not but if you use this new um kind of cured it's at function it's a scripting function that allows you to specify the specific records you want it pinpoints only those and only query for those records that can yeah that's gonna be a bit more advanced but it can definitely be useful and you know so yeah and thank you I can't remember I can't remember the name of the function I'm probably needing to remind myself how to do that again but that's basically what I did once still on top of my head either but yeah okay good thank you Phil I'll go back on mute yep thanks um and then the other thing here is I mean the the absolute easiest way to know right out the gate whether or not the results that you have looked for are um loading slowly is just use the preview right I mean see how long that let how long it takes to actually preview that so uh I'm sure that all of you are using that but if you're not I mean it is really a really quick source to to find out you know if what you're you're pulling is going to take long so um that's an indicator source so let's talk about breakdown Source here a little bit real quick so um breakdown sources are um a really good source when you get to the widget level and the indicator level where you can actually change the results that you are looking at and uh it starts at that breakdown source so a lot of the things that we just talked about will apply directly at the breakdown Source um as well um and I know Dan this is probably one of those things that are near and dear to you this is near and dear to my it's a sadly that you're ready to go with badly this is near and dear to my heart yeah um I've dealt with the coming across this one a lot lately I mentioned a little bit earlier that indicator sources are really only relevant for for performance at least only relevant during the data collection process breakdown sources are relevant during both the collection process and the widget loading time so when you're actually loading your dashboard so the importance of a breakdown Source if you have a if you have a dashboard that you're trying to apply a breakdown to and the suit because I've had like I've had a customer that a dashboard loads pretty quickly three or four seconds maybe seven seconds to hold dashboard when no breakdowns applied but as soon as they select a breakdown from the dashboard breakdown at the top of the screen it suddenly took 45 seconds for some of the widgets to load and and that was significantly based upon the efficiency of the breakdown Source itself so as Thomas said in the last slide about using the preview if you're having widgets that are loading slow and they're p and you know their pa indicators one of the first things that I look at is the breakdown source to see if there's a breakdown source that is running that takes if you just go back to the breakdown Source itself hit preview and if that breakdown Source takes more than three or four seconds to load it you you need to look at ways you can tune that better so that's what I come across a lot so that there's more of a more of the the when you're going to see this when when this is going to be important to you so yeah and I think that you know as we were talking earlier about the indicator Source I think you know the the free form string fields are another one where you want to try to avoid them um as much as possible whenever you can and uh like Dan just said preview it right yeah I mean you you can literally not go wrong with that being the uh a great determination on whether or not you've you've made that uh breakdown Source efficient or not um another thing that to think about too is always try to make sure that you can minimize the number of elements that are going to be returned um because again it's it's calling those directly at the dashboard level when you load that that breakdown it's going to go through and have all of those there so if you can limit the number of elements that are actually returned and you can do that with using like for in this in this example user related list condition you know maybe here you're looking at you know users where active is true but maybe it's something specific to incidents you say okay I just want to look I want to see users that have actually had an incident maybe assigned to them um in in a certain in the last month so any way that you can don't forget the related list conditions that you can do um which makes everything granular um as well yeah related list conditions have been my best friend honestly that's bringing up that's uh again I'm a geek I recognize that I'm a nerd with this stuff but that uh you know if you if you want to do things like um you know I I want to have a breakdown of all my Ci's well don't do all your CIS do a related list condition that says only show me CIS that are um on that have that have been on incidents in the last three months or incidents or changes in the last three months or something like that that can significantly improve by by using a related list condition it improve the performance um I also want to address the question that Maggie had um so does the breakdown order matter like maybe having priority as first breakdown but assignment group second because that has thousands and some customers even have tens of thousands of of assignment groups or other types of breakdowns generally the the place where the order matters is when you TR is to Auto load a dashboard based upon the breakdown so if I want to Auto local a dashboard and automatically have it apply the assignment an assignment group that's going to be you're Pro you're likely going to see some performance issues if you have tens of thousands of performance of assignment groups um so there's def so there's some things that you know it might be a little slower that way I would recommend not having that load automatically but otherwise the actual order of the breakdowns themselves really is more of a functionality thing of what's gonna what are the breakdowns they're gonna that are gonna make more sense for your the consumers of your content you know what are the breakdowns they're going to look for first but the order shouldn't make that much difference with performance Dan do you want to keep speaking and talk about the walking and related lists doubt walking yes can you dot walk on a breakdown from related and same related and same with the same performance effect okay so uh so I'm gonna take a guess here Phil and you can and you can type and you can type in if it's the if it's not the right answer but uh what you're talking about here so I'm going to I want to go to a let's say I want to go to obviously like that configuration item example I want to look for I want to do a related list lookup against incidents let's say or against tasks in general just against tasks um and I want to say just show me CIS that have been on tasks in the last month are you then saying that I want to say um maybe then dot walk to like the locations of those incidents um or that you know that's what you're talking about here that I wanted to condition yes okay you can do that in the conditions once you get to that first level of there there's not I guess they'll say is there's no one straightforward this is this is the answer yes or no generally if you get to that the first level of dot walking is usually going to be okay if I'm not walking in my in my uh related list condition conditions um I could but there are there are Exceptions there too so if it's a really complex lookup field if it's a if it's a string field if it things like that I wouldn't I would generally want to avoid doing any more than just one level of dot walking when we're doing that sort of condition building um but a lot of it is going to be trial and error unfortunately so there's no one one-size-fits-all answer to that but the related list condition theoretically the first dot walk okay yeah and that's why I say it's generally if it's a very simple dot walk to the second level that is the second one that's okay but that's uh you know but that that's where I wouldn't I wouldn't go any further than that ever and it's some trial and error even at that first level yeah just just that's where I find for me figuring it out using a regular report yeah is Phil more than one need a new query exactly yeah great like matching CI name with asset model yeah okay yep good example okay so now that we've created an indicator source is there anything else that we can do at the actual automated indicator level uh to make it even um you know faster our tuning perspective and and one of the first things that we talk about is can you add additional conditions at the indicator level so maybe you have an indicator source that is is that source and you're not necessarily allowed to edit that indicator Source but you know that at the indicator level you can add one One More Level to it then then that's highly recommended you know again if there's governance around the ones that that you're using or if you don't own it and you don't want to change that indicator Source you know and you create an automated indicator add an additional condition uh right there and again that will help with that as well and then the other thing too is avoid scripts right so uh at all possible if you can you know scripts inside of the conditions or if you're using a script somewhere else uh inside of the indicator avoid those as much as possible obviously there are reasons out there where you may have to use it but our our rule of thumb is always going to be um avoid scripts and and we'll talk about that a little bit more uh here in a little bit and give you some options of different ways to do some things to avoid uh the scripts so Dan Terry I don't know if there's anything that you want to speak to here at this level it's going to say I think you touch on it again but this is a really good place to use your description and this is the more fine-tuning this is where you want to make sure that you are being explicit and what you're looking for so the indicator source is not where you want to do that it's the actual automated indicator and the breakdown where you want to be a little bit more prescript on what you're pulling because that's where it's okay you've already queried the data you've already pulled it out and now you're just working from a chunk of data that's already pulled and stored in a temporary table and so this is the place for you to go ahead and be a little bit more specific and be very clear with your definitions so that they can be reused and absolutely I just I want to piggyback on that very quickly here too uh just a little of the behind the scenes for those who aren't aware when you run a collection job for performance analytics the indicator Source query is only run one time for that job even if this that same indicator source is used on 15 different indicators the query itself is only run once so that's what Tara says you want to do your fine tuning on the indicator because at what it does first it runs the indicator source and gets your data set there so you've already got a limited data set then it applies the extra conditions at the indicator level so that's so there's a real good reason for if we're doing it for planning it that way and it's a great way to keep um your system a little bit more optimized absolutely from what you can control right the admins can only yeah right so these are the things we're being clear about these are what's within your power to control so let's do the best we can one thing yeah great so now let's talk about you you've done everything right you've created your indicator Source your automated indicator your breakdown Source automated breakdown um and now you've added an indicator to uh created a widget from it what should it look like or not necessarily what you look like but how much how many widgets should should you see when the dashboard first loads does any of that make a difference all those different things so we kind of have some general rules here and uh first is six is good um obviously depending on how much data that you're actually pulling in each one of these widgets could you have more absolutely that's why we say you know tweak up or down from there if um if you find that you know the first two or three are loaded in relatively fast and maybe that fourth one takes its time maybe maybe it's an opportunity for you one to go back and see well what's making that load slower but do I want that to impact you know when somebody's looking at it so maybe I need to move that further down on the dashboard or something like that but but six I think is a great starting area it's not set in stone I think it really just comes down to what you need and how well it's working for you listen you could possibly have 10 that load really really fast and you want them to pop up on that dashboard right out the gate that's okay I mean it's it's not gonna break if you decide to have 10 we're just trying to give you some sort of guidance on that and then another thing to think about too is depending on what type of widget that you're actually showing you know um and again understanding what Dan was talking about earlier the the data is already there you know it's not like you're running it real time um if you were using a report uh as one of your widgets and maybe it was a list report you know um you might want to determine how many rows you want to come back because if it is a table that you're reporting on that has millions of records and you just have not put enough filter conditions in it do you want to have how many rows do you want to come back although at the PA level if you lose use a list for uh widget you can actually set that there if you choose to um but again that data is already sitting in a table that it's just accessing the job is run so it shouldn't be much impact but again maybe you want to look at that you know obviously and that will help you determine on how many of you that you're going to see are you going to have a really long widget that has 25 rows of data or you know maybe you just want to look at the top five and then you know somebody can kind of go from there um and again you know speed up the speed of breakdown Source query is is huge so when you add a um some sort of breakdown to your dashboard again going back to what Dan said is how many results you're going to have there when you hit that drop down list you know how many how long is it going to take to load all of those you know so the more granular that you can make the breakdown uh when it's actually on the dashboard itself uh the easier it's going to be and and really how much time it's going to take to actually see you know see those results because it can get very probably annoying might be a bad word but let's just be real it could get kind of annoying if you have 10 000 breakdown elements that you've chose are there are there situations where you need oh sure but if you can avoid that I would definitely tell you to avoid that and had smiles from the both of you so I know that you are dying to add something to that no oh go ahead no just you can see kind of just another the little of the what's happened in the background um so the you know just keep in mind that when you're loading widgets PA widgets when there is a breakdown applied you are querying against the breakdown Source every single time you load that widget so that's kind of what we mean by that that's all I want to say on that so and all I was going to add and touching on Phil's question here um Dan and I are actually going to go into much greater detail on this in the next uh uh performance analytics Academy session on the properly designing a dashboard but loading widgets on a dashboard kind of ties into that so I'm going to touch on that for just a second um you need to make sure that your data is telling the right story and you're getting the answers to the questions that you need with the minimum amount of widgets so I've seen dashboards with 20 or 30 widgets on them that aren't actionable they're just informational so you want to think about the order of importance um it's all relative um when you're combining responsive widgets with reports that's totally fine as long as they're help helping uh tell that story and um the queries themselves have been fine-tuned so if you are just loading uh reports on there just to have show the list of Records you can get that from the kpi details on a widget on the next down down into the next level so really you only want to use reports if you need something live and actionable like we recommend using reports when you're using spotlight right because you're you're looking at things that are happening real time and you need to know exactly what you need to hit what you need to pull from your queue right away um otherwise the list of Records that's that are applicable to your widget are perfectly fine by getting that in the kpi details and minimizing the widget load that you have on a dashboard and like I said Dan and I are going to get into this in great detail in a couple weeks but it is important to um remember that widget load is a thing and if you have you know 20 30 widgets on a dashboard anything below the fold people have to scroll then they take more time to load it's just something that um if they're not actionable if they're not providing value if they're not contributing to the success of attaining your goals um you might want to think about another tab or just not putting them on there I mean no is an answer what are you going to do with this data if there's no answer to that Chuck it absolutely great Point yep I was gonna answer the question for Maggie Maggie's question I said question that she asked was does collecting break the breakdown Matrix have significant impact on the on the widget on the time to load the widgets I'm assuming you're talking about the widget um so pardon me so generally The Matrix the breakdown Matrix has more to do with the data collection what's you know that overnight data collection so creating this you know populating the scores table and less to do with loading the widget because what the widget's doing is actually just reading the PA scores table which is already pretty optimized um so when you so when you have the Matrix that generally is not going to make a big difference where it does is again that the same issue of the breakdown sources if you have a breakdown source that has you have two breakdown sources they each have tens of thousands of elements in them and you're trying to apply both of them at the same time on your widget that will definitely slow it down but other than that just in general no it shouldn't make a you know it should not make a big difference on it before I answer Gabrielle looks I'm going to answer you I want to touch on that really quick I don't know that we talked about for breakdown sources really having the conversation on what's valuable because if you have thousands of breakdowns that's not valuable what are you going to do with that you need your topics what's the most important what are you trying to achieve what are you looking to flush out make sure you're fine-tuning along those lines because there nobody's going to look through thousands of breakdowns you know for some cherry pick for that you're the purpose of a dashboard is to surface up where you're inefficient to figure out where you can fine tune and improve your performance and your processes and so if you are just bringing everything to the table it's the same thing as writing a report without a filter condition or indexing every single field you're not providing the value that a dashboard is supposed to provide which is letting me know where I need to jump in and take action um Gabriella uh you want to count the widgets per tab so you definitely want to have um the minimized amount above the fold we say so that's like if you have to scroll down um then the more work you have to do to hunt and pick for for the story that you're trying to pull out and the more complicated it gets so like I said Dan and I are going to talk about this a lot but we will um say for this for this sake everything that ties to your specific business goals should be on that first page top six top four however you want to do it as minimal as possible above the fold so sometimes you can have three and then one big one below it and that still counts as you know six because it would take up like six six spots on a grid I guess that's a good way to to pull that out when you say six that's kind of what we mean great thank you Stephen oh sorry go ahead yeah oh I was just concerned no that's fine that's fine I was just going to say that for Steven's question it's like it's a really good question are these recommendations the same for classic UI versus the new UI or next experience as some of you may notice um yes that is the edit of the case uh the next experience still uses the same back end really the difference is the front end and how it's being displayed to you so the whole process of indicator sources breakdown sources adding additional conditions at the indicator level and that all exactly the same yep great Point good question all right glad you asked that yep so so looking at a time check we got a couple more here so uh real quick I want to talk about database views and then also database database indexes so you know the purpose of database views obviously you know join multiple tables together to get you know an end result that you can actually report on and you know can you apply conditions to at the database level of each one of those joins or something like that if you can that's not that's definitely recommended as well to um pull those uh the results down or be as specific as possible so definitely think about that so um here is a database this is a very generic one it's the metric ready to go no are y'all playing with me no okay this is a very um generic one and it's on you know using the metric but here you can see the different tables that are actually accessed uh down at the bottom in order to pull this information together and you know again whenever you can you know take the same table and then apply you know something to the where Clause at each one of those joints to even make it more um defined uh definitely do that as much as possibly can this is something that again only admins can do so if you don't have the access to create a database you or if you want to change something up on an existing database view you're definitely going to have to reach out to um to your admin for that but this is a really good source when you need it uh to combine some data and then being able to have it report out as one table is something um very huge so um Dan Terry did you want to add anything to that well I just want us to talk about as a group Bridget's question I mean it definitely depends on the type of join you have I'm not an X for on database views I've written them but that was a long time ago but I know it depends on if you have an inner join an outer join left or right that determines what kind of data is returned um I don't know if any of you guys can elaborate on that anymore um yeah I know that that's might be part of the issue I don't I don't know that I've ever joined to the metric instance yeah inner join restricts more yeah and it's true it's a uh it's only showing me you see also I mean if you're really into the records okay it's only because the with the database View um you do need to SP what you're specifying at the time uh database view if you're looking at it from a PA like if you're looking at an analytics hub um if that's the The View you're trying to get to when you're Drilling in you're seeing just the SC request item columns if you're working with a PA Widget the indicator source is going to ask you if the indicator source is a database view it's going to ask you which table you want to be the primary View for the records for the database view so in this case it must be said you might must I think it defaults to the SC request item take column tables so you can change that and then you if you do change that you'd also have to I would also recommend changing the at the admin level laying changing the layout of the columns rather than just customizing for yourself but that would does require an admin to do it so then you can be much more specific you can then you can cross over the two tables more easily within the database View perfect definitely all right great um the question about are we going to cover the tuning tips for reports as well actually I'm going to paste in because like I said we did that in November of last year so I'll paste in that uh link there so you can actually get to that um and I'll make sure that it's also inside of the community blog for this as well so uh the next thing we'll talk about is database index uh some tips here so you know uh create an index to order results for easy query I kind of have always used the adage it's like the old phone books I know that they don't get delivered the doors anymore I remember that as a child when our phone book would always get dropped off on the porch or something like that if you could imagine looking through a phone book with no order no Alpha alphabetical order and just like I need to find so and so well I mean when you search through uh or when indexes or databases are out there or tables or even whatnot are out there and they're kind of like that thinking about it you know some are ordered by day dates and things of that sort but if you were looking at a name field I mean it could be anything right so when you're when you're actually creating an index that looks at that so this is kind of what it would look like so if you notice here we have numbers and they're kind of all over the place but if you create an index let's say on the name then now we've ordered them so now that means that when we're actually querying that it's so much easier right out the gate to look for something because it's going to go alphabetical so that is that is the great one of the great highlights of actually doing uh indexes on things and then the next thing is you can actually also create an index on the number now caveat going back to what Tara said early that doesn't mean you need to create an index on every column inside of a table because not all indexes are useful and the more indexes that you have could actually make things even worse for you so um there are so many that are out of the box that just come out of the box that we we as servicenow said this makes sense to have an index they're out of the box and again references anything that's a reference is already uh has an index that attached to it but you know if there's something that you know that you need and you and you're you've verified that it's not there and you know it's not going to be a huge impact because it's not the 19th or 20th index on a table then maybe you want to and those are just ambiguous numbers but maybe you just want to reach out to your admin and say hey can we look at maybe adding uh this index because there I mean there are some that could be added I don't think that we create we thought of them all there could be especially if you created a new table you know maybe there's a table that you created as an organization that which means none of the out of the box index is would potentially work on that anyway maybe you need to to look at doing that as well but this is this is something that if you can uh if it's being utilized and that's great but if there's more that you need to add then definitely go for that as well Dan you had something I was just adding on to what Phillips made a comment I was just going to put it I'm just going to type it in here so I don't have anything else to add to that topic yeah I think it's a bullet right because it kind of goes to what his question is so you know when there are many indexes on the table and the database decides what's in it is there a way to force it there there is uh but you want to reach out to uh support that to actually help you with that that is not something yeah you know just can be done on the Fly I I know that our support team would definitely help you do that uh sometimes I say sometimes the best index is combined indexes because two fields are most often queried together absolutely great point I mean these are these are great points listen one of the things that we always say especially as it relates to the community is there are some really knowledgeable people as customers and these are all great points that everybody is adding and it's probably through trial and error through experience which is always the best way to really sort of figure this thing out so again indexes are huge there's a lot that are already out there out of the box again reference Fields already have them on there but if you need more talk to your adamant about uh getting those uh created in uh filtering conditions this we've we've talked about this at every level at this point right uh at the indicator Source the breakdown Source the indicator level if you can use filtering use the filtering that's what it's there for one of the ones that I think that is probably almost the best one to use is is active true right I mean that that that really filters down a lot of information if you would just kind of use that and again avoid the string you know string Fields uh avoid scripts where you can inside of the filter conditions and of course um it should be dates not States that's a backwards that's a typo there remember that as you're doing it's it's uh oh it is dates not States yeah I had it backwards yeah oh no yeah because we don't want you to script right so um one of the things that that we would definitely you know recommend is that avoid using scripts whenever you can now there's probably some scripts that are out there but there's other ways of doing it and we had a really great session by our own Adam Stout and here's the link to that I would definitely recommend going and watching this especially if if scripting is something that's being done heavily within your organization or even if you just want to kind of get an idea of how to avoid doing that in the future uh when something pops up go take a look at this Academy session it was really great really good information uh adamant is I mean Adam is Adam is very staunch about no scripts and I think when he created this he created that definitely within mind you have something Tara yeah I was just gonna say um there obviously are caveats to our our lines right um you're gonna have to cross them at some point in time if you have to use a script you find yourself in a situation where you need to use one a refer to the release notes as you continue to upgrade because we do take into account some things that um you may have needed a script for that we may have built into the product and made an enhancement so often um we don't think about going back and looking at what we scripted and undoing it but that is should be part of your tuning at every release is looking to see where you can remove a script because it's been built into the product related list conditions is a great example of that actually it will be in the deck Lou I'll go ahead and post it now into the Q a but it will be in the um on the on the actually Community blog as well but but there it is so um yeah so we answered a lot of questions during the whole thing I think we have one more uh how to filter reports twice on a dashboard make one selection first to filter reports and then select a different filter to add a second layer of filtering so I think we're talking about you know interactive filters if if you want to create put a filter on a dashboard uh you can do that and um you know you can make an interactive filter act as a breakdown so you could kind of you know use them both there but you know um if you have cascading filters you can you know select one and then select another and there's a really great Academy session that we did on cascading filters as well and I'll make sure that we add that um as well so let's see and then uh Steven asked a question about um scripting that was there were three out of the box approved scripts anything that we yeah absolutely um we real recognize those are time tested and approved for sure um but I will always continue to advise you to check um our notes and see if we've gotten away from that in any way shape and form oh we haven't on those ones for sure um but um you know never know what the future may bring so just keep checking that stuff you know that already Steven yeah yeah and um we are actually right at the top of the hour so just so we don't impose on people's times I'm gonna go ahead and finish this up if there's a question that came in that we didn't get to uh I'll definitely make sure that we answer that inside of the community event so just to close out thank you Dan thank you Tara I think this was great just having a conversation about these things and you know experience goes a long ways and we obviously have some as well as the customers that answer questions as well so thank you for that so make sure that uh obviously everyone here check out our community um there's a lot of great information that's there check that out uh obviously you know the uh platform analytics Community page check that there for previous and upcoming sessions and they're there by year so you can and I think we have four years of those so is there a lot of good information um check out our Pro tips Pro tips are actually very similar to what we just did today where we're just kind of just talking to you about things and these are really quick five six minute videos four five six minute videos that you can think about uh in your Journey from the beginning and things to think about so check those out as well make sure that you're always looking at now learning there's some really great learning that's out there as it relates to analytics here I've just put in analytics and there's tons of things that came back came back so make sure that you're utilizing that uh PA Advanced is now an on-demand course um so if that's something that you need definitely check that out as well here is a lot more academies that we have that are all under the umbrella that we are as well so check those out as well and really great content there and um one thing that we I want to make sure I spend a minute here give us some feedback right if you can scan this now uh it will be in the PDF which is will be the slide deck and go and give us your thoughts on um you know the academy in the community we want some feedback on the community is new so we're trying to collect some information on that so uh please feel free to to do that as well and in two weeks like Dan and care I have alluded to they will be doing a dashboard design strategies which I'm really excited about I've created dashboards for years but I'd be really curious to see if I was doing some things wrong which I think I have been so um it'll be good to hear from the both of them um but yeah so in a couple weeks come back and join us for that which I think will be a really great and I think it may be even the same sort of style a little bit you know just some conversation conversation around great ideas along with some slides and some bullets and things of that sort so with that thank you sorry we have went over um two minutes uh like I said this will be out there later on in the community Dan and Tara and everybody who joined thank you very much and we'll see in a couple weeks thanks thank you thanks everyone

View original source

https://www.youtube.com/watch?v=b3bXlDEE5ik