Skip to content
DbaFix
Just share answer and question for fixing database problem
MENU
  • HOME

Tag: aggregate

Speeding Up Query on a Time Series Table. It’s Slow to get (MAX – MIN) Aggregation Value

By adminPosted on February 2, 2023

Question : Question How to improve this query to increase the speed of the query shown below from 30+ seconds […]

How to sort aggregate function call

By adminPosted on January 23, 2023

Question : If I have an expensive function call that takes a JSONB and returns an INT, e.g. CREATE FUNCTION […]

How to check if list of values in one column match list of values in another column (aggregations)

By adminPosted on January 23, 2023

Question : Given two results consisting of single key|value pair (you can imagine those are in CTEs), I want to […]

Type with nested table in oracle

By adminPosted on January 16, 2023

Question : I want to create a type with a nested table. I have a table called assignment_tbl which I […]

How to aggregate in the WHERE clause referencing the subquery from the FROM clause

By adminPosted on January 14, 2023

Question : I got the following query so far: SELECT q1.ID, Content, Volume, CustomerID, runtot FROM ( SELECT ID, Content, […]

How to change aggregate function without duplicating SQL (by using SQL)

By adminPosted on January 11, 2023

Question : In SQL Server 2016 I have a scenario where data will be processed according to different aggregation functions […]

Getting around the constraint “column must appear in the GROUP BY clause or be used in an aggregate function”

By adminPosted on January 10, 2023

Question : I’m using Postgres, which enforces the constraint that all columns in a SELECT…GROUP BY must appear in the […]

Optimizing for data that does not fit in memory

By adminPosted on January 3, 2023

Question : We have a database that contains around 235 GB of data (calculcated using pg_total_relation_size for each table) on […]

Postgresql: Pattern match against array elements?

By adminPosted on January 2, 2023

Question : Is there any way to do a pattern match against the elements of an array in postgresql (9.4 […]

Slow queries related to subqueries using aggregation

By adminPosted on January 1, 2023

Question : Here’s a simplified version of the queries I am running: select … from editions join edition_events on edition_events.edition_id […]

  • 1
  • 2
  • 3
  • …
  • 35

Recent Posts

  • Restored database copy larger than original
  • SQL Server Failed Login – SQL Server login (not windows) – Random times
  • Steps or evaluation order of the SQL statement
  • Can I kill these MSCRM related SQL processes?
  • Postgres to Postgres DBLink with AWS/RDS
  • What are the pros and cons of having more data-bearing members in a MongoDB replica set? [closed]
  • Transaction log backup after full backup is too big
  • Strange behavior with Quotename and substring [closed]
  • MySQL slow select from a view
  • CREATE INDEX vs ALTER TABLE ADD INDEX – MySQLism, or SQL Standard?
  • How to run my query on a one-to-many relation to run efficiently
  • Can I get SSMS to show me the Actual query costs in the Execution plan pane?
  • What are the best Database Analytics Companies for analyzing several 1000s or Mio. of products,sum them together and analyze them for statistics?
  • How to list the permissions on User-Defined Table Types?
  • Do I need an auto-generated ID in addition to a unique field?
  • Why should foreign keys be implemented in my relational database? [duplicate]
  • Difference between changed compatibility level database and new database
  • Does a query with a primary key and foreign keys run faster than a query with just primary keys?
  • What is the limit on the number of INSERT statements you can paste into SSMS and run?
  • String or separate Table

Categories

  • Database Backup
  • Database Design
  • Database Index
  • Database Optimization
  • InnoDB
  • Join
  • MariaDB
  • MongoDB
  • MySQL
  • Oracle
  • Performance
  • Permissions
  • Postgresql
  • Query Performance
  • Replication
  • Security
  • SQL Server
Proudly powered by WordPress / Support by: DizzyCoding