On the SQL tab what is happening during the Offset time? - glimpse

On the SQL tab in Glimpse, there is the Duration column next to the Records column which I suppose is the execution time of the command, and then the next column is a time period labeled Offset. What is that actually measuring? Then there is the Duration at the far right of the column that I was guessing is the total time, but the two detailed columns to add up to that total.
Thanks!

The first duration column is the duration, in milliseconds, for the command. (Your query).
The offset column is the length of time, in milliseconds, since the beginning of the request.
The second duration column is the duration, in milliseconds, of the open connection time to the database. Often one command will run on one connection, but sometimes you'll see multiple commands happening within the same connection.

Related

Filtering for rows within every 30 seconds interval

I have a large data file from a test where I send a voltage that is increment by 1mv every 30s from 0-5V) to test the accuracy of my system. The computer outputs a file that has over 70000 rows of data but all I am really concerned with is data that occurs every 30s. Is there a way to filter for only the data that aligns with the 30s interval and ideally having around 5000 rows of data?
I am stuck and I really don't want to manually sort through 70000 lines of data, any help is greatly appreciated..
So you want to filter and only see the rows that occur every 30 seconds? You can add a calculated column in Excel to extract the seconds and filter by that column:
=RIGHT(TEXT(A1, "hh:mm:ss"),2)
This will extract the seconds from a time, and then you can filter where the seconds are 30. Replace A1 with your correct column.

Excel - How to Manualy calculate a worksheet every second?

My sheet contains links from a third application and it's set to Automatic calculation.
New data retrieved every few seconds so I should get the data every second or close to it (One of the fields the sheet retrieved is "time" so I can know how updated is that data).
Yet, I found that the data is updated every 3 minutes (and more..) rather than every second or few seconds.
I changed the Automatic calculation to Manual calculation, Results: Every click on the Calculate Now results with a "new updated" data which is indeed updated from a few seconds ago rather than 3 minutes, like it should be in the first place.
I suppose that the Automatic calculation has an algorithm to decide when to calculate and that algorithm doesn't go into my favor,
So how can I set the sheet calculation to be immediate or at least to be every second or so?

Excel: how to calculate percentage within 24h when have dynamic data (over 24h)

I cant figure out how to calculate percentage within one day (24h) with a set of data that is dynamically changing, you have one day and different time as you can see on the SS. But thing is, I can calculate general difference between time using =MOD (B3-B2,1) and then just convert that into percentage (and I am getting just small % portion within one day). But problem persists when the time is after 23:59...
That "System" Column is actually two processes that are alternately working, so one is OFF other is ON and both got that date/time (working time).
How to calculate % one system within one day - so its working time in percentage per one day (so, for 10.01, 11.01..)
Something like this, and then lets say SUM of percentages withing one day for one system. There gives me over 100% for many examples (dates).
I got a different data set (tried on other examples) and didnt work good:
SUMIFS($B$2:$B$1020;$A$2:$A$1020;$F3;$C$2:$C$1020;"<>"&G$1)-SUMIFS($B$2:$B$1020;$A$2:$A$1020;$F3;$C$2:$C$1020;G$1)+(INDEX($C$2:$C$1020;MATCH($F3;$A$2:$A$1020))=G$1)
Is it maybe cuz I edited my data from PowerQuery and then inputed to the sheet? or anything else?
Bearing in mind that a day starts from t=0 and ends in t=1 where t is time in days, for two processes A and B we can consider four scenarios:
Start with process A, end with process B
|___A1---B1___A2---B2___|
B1-A1+B2-A2
∑B - ∑A
Start with process A, end with process A
|___A1---B1___A2---B2___A3---|
B1-A1+B2-A2+1-A3
∑B - ∑A +1
Start with process B, end with process A
|---B1___A1---B2___A2---|
B1-0+B2-A1+1-A2
∑B - ∑A +1
Start with process B, finish with process B
|---B1___A1---B2___A2---B3___|
B1-0+B2-A1+B3-A2
∑B - ∑A
Where A1 is the first on time for process A, A2 the second etc. and --- means process A is on and ___ means process A is off.
So we can just subtract the sum of the start times for process A from the sum of the start times for process B and add 1 if the last process in the day is process A.
Formula for a full day (like 11/1/19)
=SUMIFS($B$2:$B$23,$A$2:$A$23,$F3,$C$2:$C$23,"<>"&G$1)-SUMIFS($B$2:$B$23,$A$2:$A$23,$F3,$C$2:$C$23,G$1)+(INDEX($C$2:$C$23,MATCH($F3,$A$2:$A$23))=G$1)
What about the first day, where there is nothing before half past one? Now it is wrong to assume that anything before process A is occupied by process B and vice versa, so have to subtract the first time if the first process is not process A and add another term to the calculation:
=SUMIFS($B$2:$B$23,$A$2:$A$23,$F2,$C$2:$C$23,"<>"&G$1)-SUMIFS($B$2:$B$23,$A$2:$A$23,$F2,$C$2:$C$23,G$1)+(INDEX($C$2:$C$23,MATCH($F2,$A$2:$A$23))=G$1)-(INDEX($C$2:$C$23,MATCH($F2,$A$2:$A$23,0))<>G$1)*$B2
So the total time on the first day is not 24 hours but about 10.5 hours or 44% of a day.

How can I generate activity map for customer care executives?

I have data of customer care executives which tells about how many calls they have attend from one time another time continuously. I need to find out whether particular executive is either busy or free in a particular period. The timings for the office is 10:00 to 17:00, so I have sliced the time with one hour in each slice from 10:00 to 17:00.
The data that I have would look like as:
Note:
The data given here is some part of original data and we have 20 executives and they have 5 to 10 rows of data. For simplification we have used 3 executives with less than 5 rows for each one.
The start timings do not follow any ascending or descending order
Please suggest the formulas with out any sorting and filtering on the given data
Required: The result table should give whether particular executive is busy or free in every hour. If he is on call for one minute it should give busy for that entire one hour period
The result should be like:
The same file is attached here:
Thanks In Advance!!!
You need to put in an extra logical test in your OR function that tests for start times less than the time interval start and end times greater than the time interval end. So in cell G31 your formula should read:
=IF(OR(COUNTIFS($A$3:$A$14,A31,$C$3:$C$14,">0",$D$3:$D$14,">=14:00",$D$3:$D$14,"<15:00"),COUNTIFS($A$3:$A$14,A31,C$3:$C$14,">0",$E$3:$E$14,">=14:00",$E$3:$E$14,"<15:00"),COUNTIFS($A$3:$A$14,A31,C$3:$C$14,">0",$D$3:$D$14,"<14:00",$E$3:$E$14,">=15:00")),"Busy","Free")

Manipulating Cassandra writetime value

Let's say I have an application, which receives periodically some measurement data.
I know the exact time the data was measured and i want every piece of data to be deleted in 30 days after it was measured.
I'm not inserting the data immediately to the database, but i want to use the time-to-live functionality of Cassandra.
Is there a way to manipulate the system intern time-stamp of a row in Cassandra so, that I can set time-to-live to 60 days, but it actually measures the lifespan of each row with my time-stamp?
E.g. I measure something at the 27.08.2014 - 19:00. I insert this data at 27.08.2014 - 20:00 into the database and set the time-to-live value to 1 day. I now want the row to be deleted at 28.08.2014 - 19:00 and not at 28.08.2014 - 20:00 like it normally would.
Is something like this possible?
I suggest you the folowing approach based on your example:
before insertion calculate Δx = insertTime - measureTime
set TTL = 1day - Δx for inserting row
Addition on the basis of a comment:
You can use Astyanax-client with Batch mutation "to simultaneously enter multiple values at once". There is possibility to set TTL on each column and on whole row at once.

Resources