Top new questions this week:
|
Most of the select statements in our stored procedures use WITH(NOLOCK) and I was told by my co-workers that they use it to improve performance. Now, I know that this hint helps with locking but does …
|
Actual plan: www.brentozar.com/pastetheplan/?id=SJviG_y1h I’m looking for advice on where to start with tuning the above stored procedure. We need it to complete in as near to 1 second as …
|
I’m running Postgres 12 on AWS RDS and monitoring it with pgAdmin. This is a read-only replica of the production database. I have a weird session with not much info, only: backend_type = startup, PID, …
|
I know this has been asked few times in here, but my case is bit different. I would like to purge the data in from my SQL Server database of 700 GB and almost 1000 tables. I spent fair amount of time …
|
I have the following query that I do not understand how it works, especially the subquery that returns the minimum ID without grouping. WITH RECURSIVE t(id, user_id, name) AS ( select min(id) – 1, …
|
Please read everything, included the notes and edits at the end Problem I have a MySQL DB with 3 different table: To save users mysql> describe users; +————-+—————————–…
|
I’m wondering about the idiomatic, or at least a workable, way to make a table that represents subsets of rows of another table. This is motivated by efficiently storing and looking up these subsets. …
|
Greatest hits from previous weeks:
|
I used pg_restore to load my postgres db with a dump file. I connected to my db with my user : sudo -u arajguru psql dump select current_user; current_user ————– arajguru Now I was able …
|
This seems to be an area with quite a few myths and conflicting views. So what is the difference between a table variable and a local temporary table in SQL Server?
|
In Postgres 9.x, for a column of type UUID, how do I specify a UUID to be generated automatically as a default value for any row insert?
|
I want to connect to an oracle database located on another host using sqlplus. This page suggested adding an item on my tnsnames to conenct to that database local_SID = (DESCRIPTION = (ADDRESS =…
|
I have a table in the name of ips as below: CREATE TABLE `ips` ( `id` int(10) unsigned NOT NULL DEFAULT ‘0’, `begin_ip_num` int(11) unsigned DEFAULT NULL, `end_ip_num` int(11) unsigned DEFAULT …
|
I’m trying to find my listener.ora file to edit it, but the docs say it’s in the ORACLE_HOME directory, but where is that? I’m running 12.1.0 on Windows Server 2008
|
This is driving me nuts! I want to rename a column from read-more to read_more in my blog table I tried all this: ALTER TABLE blog RENAME COLUMN read-more to read_more; ALTER TABLE blog CHANGE …
|
Can you answer these questions?
|
So, I’m supposed to make a trigger that applies md5 to a row after an INSERT was made on it. Here is what I came up with: delimiter $$\ create trigger pd_encrip before insert on usuario\ for each row\ …
|
this kind of argument has been discussed many times but I can’t find a precise answer. I have two dimension tables, say Customer and Address, that i want to model after scd type 2 pattern, with …
|
What could I change to make this insert work and give a new ID value on each row I am inserting? Right now it’s giving all the inserted rows the same ID number. Sadly, I can’t use triggers and …
|