Skip to main content

Questions tagged [time]

8 votes
6 answers
3k views

How can we prevent Agent Jobs running twice when the clocks change?

Context I have no idea where this is documented and was shocked that I could not find a duplicate. I only know it from seeing it go wrong several years in a row. The Problem On the day when the clocks ...
J. Mini's user avatar
  • 925
0 votes
1 answer
30 views

Why is my mean much more bigger than my Execution Time using hyperfine to benchmark my query performance?

QUERY PLAN -----------------------------------------------------------------------------------------------------...
Nuh Jama's user avatar
1 vote
0 answers
75 views

Time of last insert into table in PostgreSQL v16

I am testing new features of PostgreSQL v16. I see two new columns are added to system tables: pg_catalog.pg_stat_all_tables.last_seq_scan - records last sequential scan pg_catalog....
folow's user avatar
  • 513
3 votes
2 answers
352 views

How to sum up the distinct Total Time of an Event ignoring duplicate overlaps in Times?

I have the following EventTimes table: DROP TABLE IF EXISTS dbo.EventTimes; CREATE TABLE dbo.EventTimes ( EventTimeKeyId INT IDENTITY(1,1) PRIMARY KEY, EventId INT NOT NULL, StartTime TIME NOT ...
J.D.'s user avatar
  • 40.4k
0 votes
0 answers
104 views

Keep both non-overlapping intervals and overlapping ones with a larger id MySQL

I have the following table in MySQL: data(interval_id, object_id, start, end), where interval_id, object_id are integers and interval_id is unique per every object_id, while object_id itself is unique....
Alex.Kh's user avatar
  • 101
0 votes
2 answers
74 views

How I do I aggregate or perform calculations on a time datatype in "MM:SS:MS" in MySQL?

I'm currently working on an NBA project and I need to take the average minutes played per player, but I have no idea how to aggregate or calculate the time datatype. I know you have to convert it, but ...
thisisforfun's user avatar
0 votes
1 answer
103 views

Why does MariaDB execution time is doubled for the same query (LOAD DATA INFILE)?

I observed a strange behaviour regarding the execution time of a query to import a CSV file in an empty table created beforehand. The query execution time to import the file increases while repeating ...
GiorgioAbitbolo's user avatar
0 votes
1 answer
122 views

PostgreSQL Real-Time Analytics

Latest months I am working with PostgreSQL while coming from Microsoft world (SQLServer). My scenario is the following: Transfer data from different databases into single one (same set of tables and ...
Stavros Koureas's user avatar
1 vote
0 answers
427 views

Resample time series in SQLite

I have following table: CREATE TABLE entries ( utc TEXT, entry INTEGER ); with following data: INSERT INTO entries (utc, entry) VALUES ('2022-10-01 01:54', 23), ('2022-10-04 02:40', 46), (...
adius's user avatar
  • 113
1 vote
0 answers
68 views

How can I generate bar chart values for some time series data in postgresql?

I have a 'log' table which has two columns user_id and a ts (timestamp value of activity event for user): I can use the following query to get a list of each user_id and their last activity event: ...
Chris Stryczynski's user avatar
0 votes
0 answers
26 views

Time difference is not returning the expected result in PostgreSQL

select '06:00:00'::TIME - ('19:00:00'::TIME - '07:00:23.388471'::TIME); +-----------------+ | ?column? | |-----------------| | 18:00:23.388471 | +-----------------+ SELECT 1 Time: 0.012s Why ...
Ουιλιαμ Α��κευα's user avatar
0 votes
1 answer
94 views

Do we have information about duration time of query in actual execution plan?

I am building application in C# which is parsing Actual Execution Plan. I need basic stats like Row count, CPU time, Page Reads etc. All above stats I found in XML of Actual Execution Plan. I can not ...
grochu's user avatar
  • 45
5 votes
1 answer
793 views

Standard Deviation for Times

Is there a T-SQL coding best practice to get an accurate standard deviation value for a group of times? STDEV doesn't like the time data type. I'm thinking that maybe a conversion to minutes as an ...
AccidentalDBA_CO's user avatar
1 vote
1 answer
44 views

Convert specific time format to common one

Environment: I have 'duration' datas stored as varchar(4) in a table. 2 first characters are hours, 2 last characters are minutes. E.g.: 0100 means 01:00 0456 means 04:56 and so on... What I need: ...
EdenSource's user avatar
6 votes
3 answers
1k views

Store time series data efficiently without wasting space

I'm building an application to calculate different KPI metrics for customers of an ecommerce website e.g. (avg. order value, avg. items count and so on). KPIs are integer and or double values e.g. ...
cardy's user avatar
  • 63

15 30 50 per page
1
2 3 4 5
7