Skip to main content

All Questions

Tagged with
5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
138 views

Why do queries on two tables with the same structure have different execution times

I have partitioned a large table in a PostgreSQL database into monthly child tables with the same structure and similar numbers of rows. Recently I have noticed that the newer tables take much longer (...
Kat's user avatar
  • 21
1 vote
0 answers
59 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
  • 401
1 vote
0 answers
59 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
1 vote
1 answer
49 views

calculate days spent of all visitors from encounters

I have an encounters table CREATE TABLE visitors( id serial PRIMARY KEY, start_date TIMESTAMP NOT NULL, -- visitor_id bigint NOT NULL -- skip for now, end_date TIMESTAMP ); (end_date can be ...
Radio Active'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