All Questions

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

Does PostgreSQL have native, internal support for Roman numbers? (NOT for output/formatting!)

This is a long shot, but I need to ask: Does PostgreSQL have support for, instead of using Arabic numbers (0, 1, 2, 3...), it can use Roman numbers (I, II, III...) internally, for integers/serials ...
0
votes
0answers
25 views

What could be the cause for my high disk IO latency (from sys.dm_io_virtual_file_stats DMV)?

These are the results from querying the sys.dm_io_virtual_file_stats DMV. (I add some calculated fields for clarity). I'm finding certain basic operations in Database 7 are bottlenecking core ...
0
votes
1answer
22 views

Risk in creating a string domain

In an effort to more easily migrate from Visual Basic to plpgsql I'd like to create a string as a domain in Postgres. Is there any inherent risk in doing so? CREATE domain string AS TEXT; I ask ...
0
votes
0answers
26 views

How to create JSON with dynamic SQL SELECT results? [closed]

Updated: Shell does EXACTLY what I need (https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-json-output.html) but it doesn't appear to be a feature available within MySQL itself. I need to do ...
0
votes
0answers
53 views

Database export taking 12 hours and still running

I'm running an export for a company I haven't worked with before. Started export last night at 7:00pm and it's still running 12 hours later. It's an agile 9.3.3 database, oracle 12c. So far the dmp ...
0
votes
0answers
14 views

Is there a way to create tablespace in MySQL RDS

I'm using AWS RDS MySQL instance and using it. Now I want to create table space and assign table space to tables. Is it possible in MySQL RDS
2
votes
2answers
73 views

SQL Server - Select where using split - without declaring function

SQL Server. Compatibility level 120. I have a table where one VARCHAR column contains semicolon-separated integral values. I would like to SELECT against the values in this column as if they existed ...
2
votes
1answer
27 views

Does enabling LPIM work even if the memory pressure is coming from SQL Server itself

I have a scenario where I have 128 GB Physical memory for the SQL Server 2016 machine. It is a SQL Server dedicated machine. I have 110 GB allocated to SQL Server itself. I have performance issues ...
0
votes
1answer
22 views

Fallback to known existing records when a record is missing

Related to this question, I want to return module contents for various regions/languages. I built my site in English so I know I have all of those pieces, but since I'm getting translations from an ...
0
votes
2answers
42 views

Database design for job board based on neighbouring cities [closed]

I'm trying to implement the relationships for the data represented below. I have a microjob board, users sees job listings in their city and neighbouring cities user 1 lives in city1 user 2 lives in ...
2
votes
0answers
42 views

SQL Server Cluster Install on Mount Point

I am trying to install a Failover cluster instance and I ran into the following issue: Updating permission setting for folder 'C:\ClusterStorage\PRODSQL\SQLData\MSSQL14.PRODSQL\MSSQL\DATA' failed. ...
0
votes
2answers
14 views

Postgres - Union with different number of columns

I have 2 queries that needs to be run on a table. [SELECT *, 1 as query_cr_0 FROM invoices LEFT OUTER JOIN customers ON customers.id = invoices.customer_id WHERE (customers.id IN (64, 66, 63, 62, 65))...
-2
votes
0answers
23 views

Insert into a table and its child simultaneously [closed]

How can i insert into a table and its child that has extra attributes in addition to the ones in the parent entity in one sql query? or am i asking for something non existent? Table user: first ...
0
votes
1answer
19 views

Oracle restore to a differnet drive

I have the following script for rman to backup the main database and archive logs: connect target sysdba/password@localhost/db run { allocate channel d1 type disk; crosscheck archivelog all; delete ...
-1
votes
0answers
9 views

Upgrade Oracle from 12 to 19C [closed]

Our team is trying to upgrade Oracle 12 to 19C. Our team is investigating on the delta/amount of work required to accomplish task. Suggest best way or steps to upgrade Oracle 12 to 19C. Please help ...
0
votes
2answers
40 views

Efficient key value store in Postgres

I want to use Postgres(11 in CloudSQL) as an efficient key value store. I have about 200GB of dictionaries (average size is 10kB, the structure can be different and nested). I'm thinking about ...
0
votes
0answers
73 views

difference between two select queries [closed]

I just encountered a time-consuming query and tried to make it simpler. The hard query is something like this : SELECT TOP 100 Project.ID FROM ( SELECT ID FROM vwCartable WHERE EXISTS ( SELECT 1 AS ...
0
votes
0answers
24 views

A dbms_scheduler job is not running

I need help with debugging why a certain job is not running in Oracle with the dbms_scheduler. I have many other jobs running under the same user/schema and they work. So, how do I start finding the ...
1
vote
2answers
34 views

Identifying number of rows (COUNT) that fall between two timestamps for each minute in the hour

Good day all! I'm attempting to write some SQL that can identify the number of rows that fall between two timestamps but iteratively count them up. An example use case, a telephone call CDR for one ...
0
votes
0answers
20 views

Indexes not appearing in sys tables on Azure Secondary

I'm running the following query on an AZure SQL Read Only secondary to determine which indexes are being used. But some of the indexes are not being returned in the query. I must be missing something ...
0
votes
2answers
36 views

How to drop a procedure across a lot of databases (SQL Server 2016)

I have a simple procedure that exists in over 150 databases. I can delete them one by one, which is the most stupid work to do in the world of software development. Or I can somehow dynamically delete ...
0
votes
1answer
12 views

Partition table behavior for Postgres

I have created a partitioned table with 1 partition. below is the script for the same: CREATE TABLE public.msg ( id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY, a int8 NOT NULL, b int4 NOT NULL, c ...
0
votes
0answers
16 views

MSSQL: Distribute data into X Groups of At-most N records each

I have a set of Z entries(eg 100 records), which I want to insert into Header and Detail tables. I want to divide this group into X groups, with each group containing At-most N entries. The last ...
0
votes
0answers
17 views

Word file running an SQL command - How do I find the source SQL database?

A word 2013 file has a merge function that activates whenever this is open and it is "SELECT * FROM 'database'". As the final results have errors (the final word document feeds from the wrong field ...
1
vote
1answer
26 views

Null check condition in Where clause

DECLARE @SubDesc1 nvarchar(100) SET @SubDesc1 = null I would like to do something like that. Query 1 SELECT * From Table1 where Category = 'Category1' AND [Description] ='ABC' AND ...
1
vote
1answer
19 views

Does local.oplog.rs hold all data in mongodb replication?

I'm trying to do backup full and incremental backup, I wonder does local.oplog.rs collecitons contain all info that I need to do backup and incremental backup?
-1
votes
1answer
13 views

MySQL Server Cloud Server vs Dedicated (Root) Server

at the moment i host the MySQL server of my web app on a Dedicated (Root) server, and I am thinking of moving it to Cloud infrastructure (cloud server). Would you consider this a valid option or ...
-1
votes
0answers
20 views

Generate Unique_ID based on few records [closed]

I have rows like below 99 --row1 1 HOST 02 0 14 19 IBN STDLN 6X17AA N --row 2 3 9605944 OTWA1G148Y 0 10 613 SCA Y Y 0 --row 3 99 --row 4 1 HOST 02 1 00 11 IBN STDLN 6X17AA N --row 5 2 9572311 ...
0
votes
1answer
17 views

How do I get rid of the “LOG: could not receive data fr…” message with PostgreSQL on Windows?

(It didn't let me paste the full message into the title.) I run PostgreSQL all day, every day, on Windows. I don't normally look at the GUI window for PostgreSQL's server/daemon, but when I do, it's ...
1
vote
1answer
41 views

Migrating old SQL Servers

I found myself in a rather complex situation and need some advice... We are moving our complete environment to a new Server and virtual servers. I have reached a point where i found out that some of ...
0
votes
0answers
12 views

InnoDB: Could not find a valid tablespace file for ' table '?

i have some project hosted by wampp server, which used to work without any issue. this week , it can't serve anymore , examining the mysql logs i got this lines: 2019-12-05 08:23:00 1464 InnoDB: ...
0
votes
0answers
14 views

How to connect to pgAdmin from other computer than localhost

I am working with pgAdmin and I am trying to connect with it from other machine than the one it is running on. In order to do that, I am trying to configure pgadmin and httpd services appropriately. ...
0
votes
2answers
30 views

Locate multiple duplicate columns in PostgreSQL table

I am trying to report on duplicate records in a single table which has a unique key of app_cao_number. The duplicates occur if either: 1. The Passport field is duplicated; 2. The ID field is ...
0
votes
1answer
14 views

How to use variables in a mongodump query

I want to backup data of last day (Current Day-1) every day using cron tasks. In the mongo shell, I can query the data using variables as below: var start = new Date(); start.setHours(0,0,0,0); ...
0
votes
0answers
14 views

Is there any way easy to use eg. 50 or more values in queries , since manually putting values in query is time consuming

Is there any way easy to use multiple data (eg. 50 values) in queries import from some excel , since manually putting values in query is very tedious and time consuming.
0
votes
0answers
11 views

MySQL 5.1 jemalloc not enabled

I tried searching everywhere to enable jemalloc in MySQL 5.1 but couldn't find any answer. I also tried enabling in my.cnf [mysqld_safe] malloc-lib = /usr/lib64/libjemalloc.so.1 But this ...
-1
votes
1answer
12 views

Graph Database - data modelling - linking multiple pairs of nodes using the same edge?

I am trying understand the concepts, which apply to data modeling using Graphs - specifically on SQL Server 2019. One thing I am unsure of is can the same edge be used to connect different pairs of ...
0
votes
1answer
8 views

Remove extra return from median calculation

I have a FileMaker database where I want to calculate the median value of 3 different fields. I used the code that can be found here. In my setup, it looks like this: Let ([ beak.trait = List (...
-2
votes
1answer
55 views

SQL Server: Use Implicit or Explicit Cursor? [closed]

SELECT Table_Name FROM INFORMATION_SCHEMA.TABLES WHILE (1=1) BEGIN EXEC 'drop view ' + Table_Name END or DECLARE my_cursor CURSOR FOR SELECT Table_Name FROM INFORMATION_SCHEMA.TABLES OPEN ...
2
votes
1answer
24 views

Can you create a new filegroup for a table in a database that is live?

I have a SQL Server 12.0.5223.6 instance with a database on it. I'm wondering if I can create a filegroup for one (or more) tables while it's running? Or does it have to have no data in the tables? ...
0
votes
0answers
21 views

Auto Seeding SQL Server AG Combined with Backup/Restore

Are there special conditions under which the below paragraph from MS Docs is true? I tested this process on SQL Server 2017 Enterprise Edition and ended up with databases saying not synchronized/...
0
votes
0answers
10 views

Trigger on update of any columns to copy the update to another able

I am partitioning an existing table in production called app_users, to do this, I have created a partition table app_users_partition with it's partitions along with a trigger in app_users which copies ...
1
vote
1answer
37 views

Can I avoid TABLOCKX on DELETE?

Goal: Delete several billion records old records (roughly 600GB) across three tables with zero downtime. Methodology and Background: I plan to delete batches of records associated with 1 Million ...
0
votes
1answer
20 views

How to do automatic failover for PostgreSQL with application automatic switch?

There are two ways to try. Method 1 Use JDBC connect the PostgreSQL cluster (primary, standby 2 servers only): jdbc:postgresql://192.168.0.1:5432,192.168.0.2:5432/jiradb But failed: The ...
-1
votes
2answers
18 views

Start at condition and stop when criteria is met

i'm new to MS SQL and i have to carry out the following task. What i want to output is the time of the first occurence of Stateid = 4, go through the list and return the time when i meet a either ...
0
votes
1answer
37 views

Calculate percentage of records that have an association in another table [closed]

Table A Table B Columns Columns Performance Count Key Source ...
0
votes
1answer
22 views

Design help / Sanity check - Work order system

I, a programmer, have been tasked with creating a work order system for my group. MariaDB is the database engine we think we should use. I think I've done enough reading over the last month to be ...
0
votes
0answers
27 views

Will a MERGE between two tables ever be faster than a DROP and SELECT INTO on the second table?

Is there a scenario where it's faster for synchronizing the data from TableA to TableB by using a MERGE query as opposed to dropping TableB and doing a SELECT * INTO TableB FROM TableA?
2
votes
2answers
46 views

What type of locks does BEGIN TRANSACTION cause against a specific table that's being read from?

In the following example, what kinds of locks are generated from the explicit transaction block that wraps the SELECT INTO query? BEGIN TRANSACTION T1 SELECT Field1, Field2, Field3 INTO TableB FROM ...
0
votes
0answers
18 views

Oracle: Select values and join result from multiple rows in one with seperat cells

I have to create a select Statement, which bring me a multiple row result in one. For better understanding here my table Id | Name | Typ | Date --------------------------------- 1 | John | ...

15 30 50 per page