All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
16 views

Casting int YYYYMMDD to date produces a value 2 days off

I have extracted some data from a legacy database where dates are stored as Numeric(8) values, in YYYYMMDD format. I've stored them in a staging table in that same format, and now I would like to ...
-1
votes
0answers
6 views

MySQL Table is Huge Where Only Text Values Are Stored

I am using LAMP Stack...And one of my db table wp_options (Rows: 10,600) is now about 194+ GB in size... Not sure why the size growing so much huge... As far as i am concern most of the records are ...
0
votes
1answer
11 views

Sentry One Plan Explorer History Tab

While I'm working on index tuning I would love the history bar to populate with each run so I can see the differences, I'm probably using the tool incorrectly. My current workflow is: Create New Plan ...
0
votes
0answers
12 views

PostgreSQL database cluster

I installed PosgreSQL 12 using the certified installer by EnterpriseDB. I went through the docs. In Chapter 18.2. Creating a Database Cluster, it is said that you need to initialize a database ...
1
vote
0answers
11 views

How can I see the plan for ONE statement in a stored procedure?

I've got some SQL which I've run several times a day in development, generally getting execution time of 3-8 minutes. Now I've wrapped it in a stored procedure (with no parameters), the performance ...
2
votes
0answers
10 views

SSRS Query Timeout settings: rsreportserver.config verses RDL Query.Timeout

I'm trying to understand the interaction between the SSRS DatabaseQueryTimeout (set at the server level, defaults to 120 - does this only apply to connections to the ReportServer internal database?) ...
0
votes
1answer
9 views

How often is Postgres parsing a foreign table based on file_fdw?

I have a foreign table defined with file_fdw, which reads the data from a CSV file. Postgresql parses the CSV file and converts the date for example from YYYYMMDD to YYYY-MM-DD. This works fine. My ...
1
vote
1answer
13 views

Database design for application with multiple useres

We have a task to design a software using entity frame core and a Central SQL DB. The software will have multiple users with RBAC(Role Based Access Control). DB design shall implement user group table ...
0
votes
1answer
17 views

Does CREATE TABLE AS lock the table?

In Postgres, does this query lock films for reads and/or writes? CREATE TABLE films2 AS TABLE films;
2
votes
1answer
21 views

Simple select query hangs

I have a simple query: SELECT a.name AS a_name, b.description AS b_description FROM a JOIN b ON a.id = b.a_id WHERE b.table_name IS NULL; (Names changed to protect the innocent) ...
3
votes
0answers
20 views

Change tracking causing latch contention

I am using Microsoft SQL Server 2016 (SP2-GDR) (KB4505220) - 13.0.5101.9 (X64) Jun 15 2019 23:15:58 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2012 R2 ...
1
vote
1answer
22 views

PL/SQL Script Line with Only a Dot…What is the purpose/function of the dot?

I have inherited a pl/sql script from a previous dba that worked at my company. It is used to "clean up" failed distributed transactions. The script is easy enough to understand, except for one line ...
0
votes
0answers
18 views

Piecemeal restore only one filegroup without primary filegroup restore

I have a db in SIMPLE recovery model, and regularly take FULL,DIFF backups. This db also have filegroups for each month. Each filegroup has exactly one NDF file. Like this: FileGroup: PRIMARY File: ...
0
votes
1answer
9 views

Upgrade all MySQL columns, tables, and databases from utf8mb3 to utf8mb4

I have thousands of columns across hundreds of tables in about a hundred databases inside a MySQL instance that need to be upgraded from utf8mb3 to utf8mb4. Is there a way to generate ALTER ...
0
votes
1answer
32 views

SQL Server White Papers vs Books Online - What's the difference and where are the white papers?

I've heard people reference white papers. After doing a preliminary search for SQL-Server white papers, there are various sites with random pdfs. I'm looking or white papers that will help me gain a ...
0
votes
1answer
19 views

How to Grant A User Under A Sql Domain Account To Insert and Update Records

I have a sql domain account in sql server like DOMAIN\GroupName. There are many user accounts under that account like DOMAIN\user.name. I want to give insert and update permission only to a user under ...
1
vote
0answers
11 views

How to select specific databases in a backup retention policy maintenance plan cleanup task?

I have full backups of three different databases. Right now all of their backups follow the same retention policy, but I need to setup the retention to a different amount of time for each database. ...
0
votes
0answers
16 views

Adding a column and new foreign key constraint in one line

Let's say we have a table called Salesman with the folling properties Create Table SalesMan( EmplyeeId int Primary Key, Name varchar(20) Not Null, LastName Varchar(20) Not Null, Email Varchar(...
0
votes
2answers
17 views

Count violated unique constraint caused by INSERT statement

I would like to add rows from table2 into table1 and see how many conflicts of the type "duplicate key value violates unique constraint" result from this in PostgreSQL. pkey is a primary key, so there ...
1
vote
0answers
12 views

MySQL SELECT .. WHERE .. ORDER BY … LIMIT 1000000,10 performance

I have following Innodb table with ~2.500.000 rows: ID | param1 | param2 | param3 | param4 | sort_field1 | sort_field2 | sort_field3 | sort_field4 ID - int, PK param1-4 - tinyint(1), INDEX (it has ...
-1
votes
0answers
29 views

ERROR: Invalid length parameter passed to the LEFT or SUBSTRING function

i am trying to get only number from string. SELECT CONVERT(int,REPLACE(SUBSTRING(cityText, 3, 3), '-','')) AS city1, REPLACE(SUBSTRING(cityText, 6, 2), '-','') AS city2, CONVERT(int,...
1
vote
1answer
18 views

Pglogical - multiple database tables to single table

I have 4 databases, each database is having 2 tables. The table structure on all the databases are same. So i want to replicate these two tables from all 4 databases to a single database. So my ...
0
votes
1answer
7 views

how to make postgresql in cluster(HA Active-Active) and auto sync the data between them

For one of our application we need to build the database as mentioned in the title. We have one of our application which need to run in postgresql ha active-active cluster . Were postgresql cluster ...
1
vote
0answers
6 views

Deduplicate table based on createdate

I'm new to SQL and I'm trying to get my head round a lot of stuff but so far with little success. So I'm trying to get some help, here goes I have a table "Userdata" Email | FirstName | LastName | ...
-1
votes
2answers
9 views

i want fetch json data in mysql

I am using MySQL version 5.6.41-84.1-log, I want to fetch single column of JSON data example: I want to fetch date only id | amount_detail ---------------- 1 | {"1":{"amount":"1000","date":"2020-...
-1
votes
0answers
18 views

Hierarchical Query with join

This the current Hierarchical Query: SELECT object_id BULK COLLECT INTO object_ids FROM objects WHERE ROWNUM <= batch_size START WITH object_id IN (SELECT object_id ...
0
votes
0answers
8 views

fixing broken convert_tz() in Mysql?

I come across the documentation for convert_tz() in MySQL and it says If the value falls out of the supported range of the TIMESTAMP type when converted from from_tz to UTC, no conversion occurs. ...
1
vote
1answer
15 views

Remove the deeper jsonb element in Postgres

[ { "type":"test.added", "values":[ { "field":"field1", "value":"fieldValue1" }, { "field":"field2", "...
0
votes
0answers
44 views

You do not have permission

I have this grant permission below use eNtsaRegistrationDB go grant select on UserReg to Users; Cannot find the object 'UserReg', because it does not exist or you do not have permission. Both of ...
0
votes
1answer
21 views

How should i index this?

i always had this question and i hope you can help me with this, how should i index created_at if i need to order results based on date. Example: COMMENTS TABLE: ID (UUID) ENTRY_ID (UUID) USER_ID (...
0
votes
0answers
10 views

PostgreSQL performance benchmark results of version 9.5 and above [closed]

We are trying to evaluate Postgres version 9.5 and above in terms of performance benchmarks. Could someone please share links/stats of official Postgres performance benchmark results on hardware for ...
0
votes
0answers
18 views

When should we index a key K1 when a composite index already exists with K1 placed first?

If a table already has an INDEX (K1, K2, ...), when is it a good idea to create an INDEX(K1)? More generally, when INDEX (K1, K2, K3, ...) is present, under what circumstances is it a good idead to ...
0
votes
0answers
3 views

Looking the way to install pg_rman on Cento6.10 i686 with postgresql11

Information: CentOS release 6.10 (Final) Linux Localhost 2.6.32-754.24.3.el6.i686 i386 GNU/Linux I have tried to install pg_rman on my CentOS release 6.10 i686 server but no luck. I also tried to ...
0
votes
2answers
18 views

Need help in optimizing a slow Postgres Query

So, I need to calculate a rolling Monthly active users on everyday for last 100 days. In output, one column should represent the dates of last 100 days from today and against every single day, number ...
0
votes
0answers
15 views

Is there any tool/extension available in PostgreSQL to monitor the growth of DB and objects?

We are looking for a procedure to monitor the DB growth. Could someone please help us to track the growth of the DB and Objects on a daily base in PostgreSQL DB?
1
vote
1answer
50 views

ALL permission is deprecated and maintained only for compatibility?

How can i resolve this issue below? use eNtsaMemberRegistrationDB go grant all on tablename to Users; Message The ALL permission is deprecated and maintained only for compatibility. It DOES ...
0
votes
0answers
22 views

How to learn MySQL properly to gain real experience?

Currently my career path of DBA and job duties do not include MySQL RDBMS setups. I'm seriously interested in MySQL database administration/development and as you all know real experience comes from ...
0
votes
0answers
11 views

Incremental Load SSIS Job not capturing Data from CDC tables [closed]

I have few tables enabled with CDC and SSIS job is working side by side to deliver the incremental data to FTP via text files. It was working fine few days back but now job is generating the files ...
0
votes
1answer
9 views

How can I Get Value of Max(col) in a greatest n per grouped by into Declared variable. MS SQL sever

I am looking for how to set the value of @MaxItemSeqNum to the returned result of the column MAX(dbo.[Table1].[Item_Seq_number]) in my select statement. I need this in order to insert the next record ...
0
votes
1answer
15 views

How to select Overdue Rows with Date Frequencies?

+------------------------+--------+ | Invoice_id | due_date | amount | +-------------+----------+--------+ | 20 |2020-01-18| 1250 | +-------------+----------+--------+ | 21 |2020-...
0
votes
0answers
7 views

Combining MySQL instances on AWS RDS and EC2

What kind of restrictions on RDS can be a problem when I am trying to combine RDS databases and multiple MySQL running on EC2?
0
votes
1answer
18 views

Is it okay to use MySQL Workbench with MariaDB?

Workbench 8 gives me a warning when connecting to MariaDB, but it appears to work fine. Since MariaDB is based on MySQL, would it be a problem to keep using it?
0
votes
0answers
8 views

MYSQL - Run a query based on the results of a query

Trying to do some cleanup in the database, per manager request. However, I can't seem to get Mysql to run the inner query as written. select @tbl:=column_name as'Table', ( select max(length(@...
0
votes
1answer
11 views

PostgreSQL How to get friend requests in table by seeing if there is a duplicate of the reverse of a column?

I've a table, CREATE TABLE friends ( friend1 serial references users(id), friend2 serial references users(id), unique (friend1, friend2) ); Friends are in no particular order, but I ...
0
votes
1answer
34 views

Freelancer has access to Firebase Database. What should I do? [closed]

Back in November, I put up a $100 bounty on a freelancer website for anybody who could debug a bug I had found in my app I was developing and couldn't squash. It turns out the freelancer was in no ...
0
votes
0answers
28 views

SSIS ETL Deadlock (Single Job)

I have a single SSIS Package on the server running via SQL Agent Job. Every now an then we are getting deadlocks issue. I used Breant Ozar's sp_BlitzLock to find out the deadlocks history and got ...
1
vote
0answers
27 views

Do concurrent in-memory databases exist?

I spent days searching the internet but all the databases I found are at most in-memory but not concurrent. By concurrency I mean that they run on multiple threads and can do multiple reads ...
0
votes
1answer
9 views

How does MySQL skip ranges (nodes) in a loose index scan?

I've read the MySQL loose index scan, and it makes sense as optimization, however, when using an example B+tree, I don't understand how nodes can be efficiently skipped, due to potential matches ...
0
votes
0answers
51 views

SQL Server on Virtual Machine or not? [closed]

According to sqlserver new upgrades do you know any useful information about compatibility of sqlserver with virtual machines? I want deploy sqlserver instance for a large system (about 15 terabyte ...
0
votes
1answer
38 views

Calculating the value of a column based on consecutive values of rows in another column

It is straight forward to compute column value based on values of other columns, e.g. speed/time AS acceleration where speed and time are columns. Is there a way to compute column's value based on ...

15 30 50 per page