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

Tag: set-returning-functions

C Extension: Is it faster to return a set with ValuePerCall or Materialize mode?

By adminPosted on November 28, 2022

Question : PostgreSQL documents it’s Set Returning Functions with C extensions like this, C-language functions have two options for returning […]

Filling in missing dates in record set from generate_series()

By adminPosted on November 6, 2022

Question : Consider: with days as (select day::date from generate_series(date ‘2013-01-01’, date ‘2013-01-01’ + 365, interval ‘1 day’ day) day […]

Call function where argument is a (sub)select statement

By adminPosted on September 25, 2022

Question : My function takes an int4 as argument and returns a table: SELECT * FROM test_function(545421); — works fine […]

jsonb_each_text(jsonb) returns jsonb, not text

By adminPosted on September 25, 2022

Question : According to docs , jsonb_each_text(jsonb) returns setof key text, value text but if you pg_typeof(value) on result it […]

PostgreSQL: Is it possible to get a different function result type (i.e. TABLE) in stored function based on input?

By adminPosted on September 17, 2022

Question : The question is as follow, I wanted to get some flexibility in my example function, so based on […]

Extract and combine multiple values from a jsonb column

By adminPosted on August 10, 2022

Question : I am looking to extract multiple values from a jsonb column in Postgres, and am running into an […]

T-SQL Daylight Saving lookup table – poorly performing table-valued function

By adminPosted on July 31, 2022

Question : I’ve created a “Daylight Savings” lookup calendar table for the GMT region. The function I’m using to query […]

Efficiency of Scalar UDF vs TVF

By adminPosted on June 22, 2022

Question : I am trying to optimize the rollup code for my company and ran into a very peculiar issue. […]

How do I optimize my transaction level running balances cartesian join?

By adminPosted on June 10, 2022

Question : This is a continuation of an question found here: Generate multiple running totals with GROUP BY day This […]

T-SQL Daylight Saving lookup table – poorly performing table-valued function

By adminPosted on June 10, 2022

Question : I’ve created a “Daylight Savings” lookup calendar table for the GMT region. The function I’m using to query […]

  • 1
  • 2
  • 3
  • …
  • 6

Recent Posts

  • Reasons for avoiding large ID values
  • Sql Statement to display multiple true statement
  • How do I force SQL Server to use my spatial index through a view?
  • How to optimize selection of pairs from one column of the table (self-join)?
  • Unable to drop the table since its showing waiting for meta data lock
  • SQL Server: localhost vs MSSQLLocalDB
  • Exclude rows when a column has matches
  • Converting 3 Master + 1 Slave to 4 Master – Any advice?
  • Creating a test database from Production database (different machines & servers)
  • Wrong results on queries with join for some MariaDB versions
  • Find any employees who earn less than the employee hired immediately after them [closed]
  • SQL Server Replication Agent Permission
  • Index usage on a temporary table
  • MySQL – Simple update is very slow and causing high load average with large amount of server
  • PostgreSQL is not using index with large data
  • During installation can’t change directory
  • Column order for better index
  • Why is this PostgreSQL volatile function faster than an inline subquery?
  • Ignoring temp table in Postgres event trigger
  • How do I get the difference in minutes from 2 timestamp columns?

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