All Questions

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

MSSQL Join between big and empty tables

I've got an issue with estimated cost and join predicate : SELECT c.Id FROM Table_A a LEFT JOIN Table_B b ON b.Id_A = a.Id LEFT JOIN Table_C c ON c.Id_B = b.Id WHERE a.Id = 2500 OPTION (RECOMPILE) ...
0
votes
1answer
336 views

mongo2.6 local file size on secondary is much larger than primary

I set up a new standalone mongo2.6 and copy one folder(database) from another machine to its data path. (cause I enabled directoryperdb) Then I set up another machine to make them as a replica set. ...
1
vote
1answer
511 views

How can I disable the notifications shown at bottom right corner in pgAdmin 4?

The notification window at bottom right corner is pesky. Is it possible to disable it?
0
votes
1answer
3k views

Mysql replication, error 13 (permission denied) with slave_load_tmpdir

I've setup a virtual machine on Azure with Ubuntu 16.10 and Mysql 5.7 for a database replication Master/Slave from another server. I followed this article: https://www.opsdash.com/blog/mysql-...
1
vote
1answer
27 views

UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER' in Agent job

In brief, I added a computed column to a table and then Agent jobs began failing and reporting the error: UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'...
3
votes
2answers
1k views

PostgreSQL - Enforcing unique constraint on date column parts

I'm trying to enforce a unique month and year combination on a table with a data column. e.g. create table foo ( mydate date ); I want to enforce that only one row per month and year is valid i....
0
votes
1answer
46 views

Update multiple strings with another at once in SQL [closed]

I have a requirement where, if column has values 1. pun/pat it should display like pune,patna 2. If only pun it should display only Pune Thank you for any leads.
-1
votes
2answers
4k views

Select first and last rows between two dates MySQL

I have query: SELECT id, coins_id, first_coin, second_coin, price, `time` FROM hist_all WHERE `time` between (NOW() - interval 120 minute) AND NOW() AND (second_coin = 'USD' OR second_coin = 'USDT')...
0
votes
1answer
2k views

How to connect to Mongodb Atlas from command line

I am currently taking the m220 lecture for javascript developer, and i am having issues connecting with my Atlas sandbox, I get the following output when I try to connect. my connection string is in ...
0
votes
1answer
687 views

How MySQL Table cache hitrate should be calculated?

I have a MySQL 5.7.15 instance which is monitored by nagios with check_mysql_health plugin. One of the metrics monitored is tablecache-hitrate which is triggering a critical alert. (hitrate ~50%) My ...
0
votes
1answer
7k views

Unable to begin a Distributed transaction

Can someone help me to troubleshoot this error? Error:OLE DB provider "SQLNCLI11" for linked server "TESTSERV" returned message "No transaction is active.". Msg 7391, Level 16, State 2, Line 7 ...
-1
votes
0answers
20 views

Simple inventory management db design - polymorphic association?

I’m designing a web application for internal use to inventory-manage returnable/reusable widgets (a physical product). I anticipate around a 100 or so ‘stock/widget transactions’ per day. In simple ...
3
votes
6answers
3k views

Remove Dot at end of line of the string in SQLserver

I would to like to remove the dot at end of the line alone if exists in the string in SQL server. Example: ABC Private's co., ltd. Required output: ABC Private's co., ltd
0
votes
1answer
570 views

Repair by Sort not working

I am trying to import a .sql file which has MyISAM engine, about 51 million rows with 18 columns. The file has 1 primary and 1 unique key. I have after lurking around this site and reading mysql ...
1
vote
1answer
43 views

Restoring a MS SQL Server database on Linux

I am running Manjaro Linux and I am trying to restore a Microsoft SQL Server database from a .bak file. I am trying to follow the official documentation, but it doesn't seem to work! ➜ ~ sudo ...
0
votes
3answers
305 views

MySQL Query/Connect to eximstats?

I'm trying to run a report for my clients in real-time. I created a new eximstats user (renamed the old one) with: update mysql.user set password=password("XXXXXXXXX") where user="eximstats"; In ...
-1
votes
0answers
45 views

Huge difference in logical reads for the same query and same data in different executions [closed]

When capturing long running queries in SQL Server (with XEvents), I have realized that some of them perform a huge number logical reads (millions). However, when I run the exact same query a few ...
0
votes
1answer
737 views

“undefined function pg_pconnect()” when connecting to Postgres from CodeIgniter

I just installed Postgresql and pgadmin in my Ubuntu system. I can create a database from the pgadmin interface and everything seems ok, but when I try to connect to the database from my CodeIgniter ...
1
vote
3answers
954 views

Query to see Index Fragmentation on all databases without using SP or temp tables

I am trying to compile a index fragmentation report on all databases, in a multi-server environment. The query will be executed via an openquery command, so I would like to make it as simple as ...
0
votes
3answers
412 views

Unable to replicate a database

I setup a master slave replication, where the master has the following setup datadir = /mnt/DATADIR/ bind-address = 0.0.0.0 binlog-ignore-db = information_schema,...
0
votes
0answers
54 views

Removing Duplicates in LISTAGG

In the query below, I used the LISTAGG function to aggregate certificate names I.e. JPM_DESCR90 . However , now I'm trying to find a way to remove all the duplications in the row, and reducing the ...
0
votes
1answer
95 views

App Engine Standard connection to Cloud SQL Latency Randomly

I have a pretty "basic" app that we designed that was originally on a local plesk server and we migrated to GAE/GSQL/GCS. app engine, mysql, cloud storage. Here's some background info: App is PHP ...
2
votes
1answer
2k views

Error Msg 10314, Level 16, State 11 with SAFE assembly after upgrade to SQL Server 2017

I have a pre-SQL Server 2017 database that I restored into / upgraded to SQL Server 2017. In this database I have a SQLCLR Assembly. The Assembly is marked as SAFE since it doesn't do anything ...
0
votes
2answers
53 views

Running a query on the results of another query?

I have 2 queries, they both run fine and pull the results I'm looking for. However, I need to be able to run one query from the results of another. This is t-sql/mssql/sybase For example, the ...
0
votes
1answer
56 views

Non-clustered index covering a clustered index

I have a table that has the following indexes: IXC clustered index that includes a single column : A asc. IX1 that includes two columns : A asc, B asc. In this case ICX seems like a duplicate index ...
1
vote
2answers
24 views

GUID vs Identity on a table performance [duplicate]

My question is using a guid(data type unique identifier) versus using identity specification(data type int). Are there any articles where it talks about why you would use one versus another? I'm at a ...
0
votes
0answers
21 views

SQL Syntax to get one row for each Employee ID and max date

I joined a few tables in order to get data pertaining to certification by employees. I have a query that gives me the employee id, name, certification start date JPM_DATE_3, certification end date ...
3
votes
1answer
407 views

Finding out the exact size of the database after inserting records?

I have this query: SELECT table_schema "db.name" , Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema; Does this query ...
0
votes
1answer
34 views

SQL Server Log Shipping for Server Migration - What's the final step?

Working with a server running SQL Server that was the log shipping target for two other servers as part of server consolidation/migration. In other words, server B was log shipping to server A and ...
1
vote
1answer
23 views

Oracle ram usage higher than memory_max_target

To begin, while I've worked with Oracle for many years, I'm far from a DBA. (and it'll take probably a few weeks before I can get one assigned to look at this.) I've got an Oracle instance that is ...
1
vote
2answers
17 views

Does PostgreSQL btree_gin extension uses btree or gin data structure?

In order to define a GIN index on an array and scalar field (for example) you need to enable the btree_gin extension in PostgreSQL. Then you can define your indexes as a GIN index. However I don't ...
1
vote
1answer
146 views

PostgreSQL - Replica Recovery Process Stuck frequently (epoll_wait taking too much time)

We have Master Slave Setup with Asynchronous Streaming Replication (Replication Slots). Frequently our Replica's entire Postgres processes seems to be doing nothing (or stuck?). Since ...
1
vote
3answers
27 views

PostgreSQL (big data): search by tags and order by timestamp

We need to add a search feature on a large table (200M+ rows): item_id | tags | created_at | ... ------------------------------------------------------------------- ...
-3
votes
2answers
37 views

Want to extract column values that are not present in another column [closed]

I am having two different column in two tables. lets say dept_id in Departments table and pNot_dept_id in Emp table. let say i am having values in column pNot_dept_id in Emp table, as follows: ...
1
vote
2answers
3k views

Crow's Foot notation and identifying -vs- non-identifying relationships

Is it possible to distinguish between identifying and non-identifying relationships using the Crow's Foot notation? Case in point: In table Book, part of the book's Primary Key is a FK to the Author ...
0
votes
0answers
11 views

Correct MongoDb connection pool strategy

I am not using any sort of ORM just the mongo node.js driver in express. Currently I wrap every request in a promise that creates a new mongo client and closes the connection when the promise either ...
2
votes
1answer
323 views

what is oracle universal installer in oracle database products

I am new to oracle database products. I am planning to install oracle 11g express edition in my PC,it looks like a standard installer.But in many of the oracle database installation tutorial mentions ...
0
votes
1answer
45 views

Should a filtered index theoretically perform faster in this example?

I have a SuperheroMovies table which has all superhero movies, and has a column called "UniverseName" which has either the values "Marvel", "DC", "Capcom", "Unknown". It also has columns called "...
0
votes
1answer
25 views

Returning values for Stored procedures in PostgreSQL

I was reading PostgreSQL Tutorials there I found In case you want to return a value from a stored procedure, you can use output parameters. The final values of the output parameters will be returned ...
0
votes
1answer
10 views

502 error after restarting mongo db in remote server using fork command

I was trying to upgrade mongo 3.4.20 to 4.0.14 , but it lead to the system crash, so i tried reverting it back to 3.4.20. But after doing db restart using fork , there 502 error. Please help.I tried ...
-1
votes
0answers
56 views

Oracle 19: Cannot connect via ODBC but it works with Oracle SQL Developer

I am using Oracle SQL Developer to export data to CSV format. I would like to connect to the same Oracle database from R and/or Python via ODBC to do some statistics, but after following this tutorial ...
0
votes
1answer
45 views

SQL Server 2016 - unexpected privileged time bursts

MS SQL 2016 SP2 CU8 + Always On. 1 CLR module (occasional usage, no correlation with the issue) I'm looking for methods to find the reason for such behavior. DBCC FREEPROCCACHE solves. But after ...
0
votes
1answer
89 views

How to make use of WITH in PostgreSQL to reduce query cost

I am trying to get twitter data of narendramodi using below command. SELECT b.t_id,a.profile_image,b.tweet_text,e.media_media_url,b.retweet_count,b.favorite_count as like_count,count(...
1
vote
1answer
26 views

Slow bitmap heap scan on group/count query in a large table

I run an app with a database of PostgreSQL 10.10 I am optimizing a bunch of queries in our application, with great results so far, but there is one specific query that takes about 1 minute if not ...
0
votes
0answers
16 views

MongoDB generated ObjectID for arrays is descending instead of ascending

I have the following document in a collection in my MongoDB database: "_id":"5e2088563824e72ea5ee7095", "image":"xxx", "questions":[ { "_id":"5e2088563824e72ea5ee70c3", "text":"...
0
votes
0answers
21 views

Login failed for user Domain\MachineName$ local Machine

We have some problems with 2017's sql servers. There are lots of errors with text like: Login failed for user Domain\MachineName$ Reason: Could not find a login matching the name provided. [...
4
votes
1answer
619 views

Why does restarting MongoDB 3.0.x boost performance?

I have a MongoDB in my Development environment running on Windows, the server has 64GB of RAM, but MongoDB has only consumed 26.9GB (here we are building the database), so it should be able to hold ...
0
votes
1answer
14 views

Meaning of FETCH_CURSOR jconnect_implicit_1 in Sybase

Situation I am trying to troubleshoot performance when connecting to Sybase ASE Version 15.7 from Sqoop over JDBC. Though I cannot check things myself it appears to be 10x slower to extract data ...
1
vote
1answer
10 views

Can I improve the way pg_dump exports inherited tables?

Given a postgresql 12 database with some table inheritance, and the child table adds no additional columns: CREATE TABLE parent ( id integer NOT NULL PRIMARY KEY, name text NOT NULL ); ...
0
votes
1answer
19 views

Using pg_dump to create 144 backups per day

Imagine the following scenario (this may not be a viable or sensible idea but please imagine that it is). Using Ubuntu, a cron job calls pg_dump and backs up a Postgres database every 10 minutes. In ...

15 30 50 per page