Newest Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Choosing a primary key?

When I create a table e.g. CREATE TABLE t (a INT); It provides a default primary key. Is it best practice to stick to that default?
Brendan's user avatar
0 votes
2 answers
52 views

ORDER BY slows down query to never finish

I've the following query (it's from Moodle, here: https://github.com/moodle/moodle/blob/a83b1500bbb9a17187ec096c3eca08c8fedf1cfd/lib/completionlib.php#L1708): SELECT DISTINCT c.id AS courseid, cr.id ...
Nrgyzer's user avatar
  • 103
0 votes
0 answers
21 views

DEA 2.6 Startup Error – MEF GetExportedValue Prerequisite Import Failure

Installing Microsoft Database Experimentation Assistant (DEA) v2.6 on Server 2022 fails to start with: System.InvalidOperationException: GetExportedValue cannot be called before prerequisite import '...
Manthan Prabhu's user avatar
0 votes
1 answer
52 views

Why a expression alias can't be refered by "HAVING" but can be by "ORDER BY"?

I'm using Postgresql-13, and writed a SQL as following: SELECT qsrc_name, count(*) cnt FROM qt_errors GROUP BY qsrc_name HAVING cnt > 1; and gotten error as: ERROR: column "cnt" does ...
Leon's user avatar
  • 413
1 vote
2 answers
45 views

User variable in "WHERE IN" statement

I'm having difficulty using a WHERE IN() and a user variable together. When I use a WHERE IN() statement without a variable, everything works well: -- Returns three rows SELECT id FROM users WHERE ...
neoncube's user avatar
1 vote
1 answer
90 views

Rollback plan after upgrade from SQL Server 2016 Standard edition to SQL Server 2022 Enterprise edition

I'm planning to upgrade our SQL Server from 2016 Standard edition to 2022 Enterprise edition. To prepare for potential issues, I want to have a rollback strategy in place. If, after the upgrade, our ...
Alexandre Alvaro's user avatar
1 vote
1 answer
29 views

Does tmp_table_size grows based on users growth and usage?

From sources : The tmp_table_size variable is categorized as a global buffer because its value is a single, server-wide setting. It doesn't get set or changed on a per-session basis. This makes it ...
Mannoj's user avatar
  • 1,593
4 votes
1 answer
2k views

SQL Server - Payroll query kills database every month

so admittedly I'm not the best at query tuning, and could really use some guidance on how to tune this query. It's a month end payroll query that pulls A LOT of data, but ultimately doesn't need all ...
Ar Ma's user avatar
  • 57
2 votes
1 answer
68 views

How to correctly store and retrieve timezone-aware timestamps in GridDB Cloud using Python without losing offset information?

I’m using GridDB Cloud with the Python client griddb_python and storing IoT event timestamps that are timezone-aware (e.g., UTC+05:30). Example row insert: import griddb_python as griddb import ...
VIK's user avatar
  • 31
2 votes
2 answers
68 views

How to handle partial batch insert failures with Python in GridDB Cloud while maintaining row order and avoiding duplicate inserts?

I’m using GridDB Cloud with the official Python client (griddb_python) to insert large batches of rows into a TimeSeries container. I’m calling put_multiple_rows() for efficiency, but occasionally I ...
Klc's user avatar
  • 31
1 vote
1 answer
34 views

RDS master user shouldn't be able to query msdb

I don't like working in RDS. I can't even query sysjobschedules with my Master user This data isn't completely gated off from me. For example I can see the schedule data in the job management UI. I ...
Peter Vandivier's user avatar
2 votes
2 answers
102 views

How can I tell if my BPSORT waits are the result of spilling batch mode sorts?

BPSORT sort waits mean that I have batch mode sorts. This is okay. However, I'm aware that batch mode sort spills are very slow. How can I tell if a query that appears to have high BPSORT waits is ...
J. Mini's user avatar
  • 1,267
1 vote
1 answer
46 views

Not sure how best to model this rather obscure requirement

Imagine the following tables: create table thing (thing_id uuid primary key, thing_name text, thing_attribute int); create table core (core_id uuid primary key, core_name text, core_attribute int); ...
Richard Hansell's user avatar
0 votes
0 answers
12 views

RML Utilities – DTCTransaction EndTime Column Missing in Trace

While learning RML Utilities, I’m trying to generate an .RML file using ReadTrace. The tool fails because the trace must include the DTCTransaction event and its EndTime column, but EndTime is not ...
Manthan Prabhu's user avatar
0 votes
0 answers
60 views

Increased query latency in Postgres after reindex

I reindexed (concurrently) an index on the biggest table used in a query, but for some reason the latency of the query has increased from aroun 6 ms to 150-200 ms. The reindex was performed because ...
notem101's user avatar

15 30 50 per page