0
votes
0answers
7 views

Sql get results only containing all keywords

Let's say I have mysql table called SONGS, with columns: Artist | Featuredartist | Songname | Year What I need is to get Artist and Songname, only containing my keywords (and no matter how they are ...
0
votes
0answers
4 views

MySQL - Harmonize multiple time ranges

I have the following problem with harmonizing multiple time ranges. Let's say I have the following data: |range_object_id | start_time | end_time | |-------------------+---...
0
votes
0answers
9 views

Financial Statement table

I want to ask about database design for financial statement. I want to combine balance sheet, profit loss, cash flow,and ratio into one big table since each statement is dependent each other. Here ...
0
votes
0answers
4 views

SELECT Query is slow when run remotely in MySQL

When I connect MySQL from remote server and run below query then the results are very slow(Sometime even faced lost connection Issue). However when I run the same SQL query on the local machine then ...
0
votes
0answers
8 views

ERROR: role “user2” does not exist [ERROR:0, SQLSTATE:42704] when user does exist

I am using PostgreSQL 9.5.2. I have an application which upgrades my schema when a new schema version is out, and as part of the script, I want the application to grant privileges on the newly created ...
2
votes
1answer
10 views

Howto implement correctly Businness Logic in database

I'm searching about how to disable triggers, and seems like it's not possible under MariaDB. My problem is, how to manage then, when you import data. I have a database where almost all business logic ...
0
votes
0answers
10 views

I want to make a website similar to Udacity, Coursera e.t.c. for online courses. Which technology should I use for storing the course information?

I am mainly confused between storing the information of a certain course in an SQL Database A JSON / XML file for each course which will then be stored in a file storage system and can be retrieved ...
0
votes
0answers
11 views

Replication from Enterprice to Standard edition

Can I define transactional replication while Publisher and Distributor are in Enterprise Edition and Subscriber is in Standard Edition? What I need to consider in case it is possible ( I already know ...
0
votes
0answers
7 views

We need to design a schema for storing person profiles, with data sourced from multiple sources

Person profile will have data points such as Name, Email (multiple), Twitter, LinkedIn, Facebook, Google+, DOB, Company, Position, Date of Joining, etc. This data will be collected from multiple ...
0
votes
0answers
6 views

Is it possible to migrate a postgresql database without downtime?

I have a Postgresql Database on my Centos, I use barman to backup my database, my question is that is it possible to migrate my database to another server without downtime? I know some solutions with ...
1
vote
0answers
12 views

What might be the cause of regular periodic slow transactions on an OLTP system?

I have a two node Oracle RAC cluster with that runs an oltp application against it. I have both a production and a duplicate test environment with the same setup. Upon running stress tests on the ...
1
vote
0answers
9 views

Is it possible to change pgAdmin SQL completion shortcut?

In pgAdmin SQL query editor, the default SQL code completion shortcut is ctrl-space; however, my native language is not English, we use ctrl-space to switch input method. Is it possible to change ...
1
vote
1answer
49 views

Joining Tables in the FROM vs. the WHERE clause

First time caller here. I have a question regarding best practices when joining tables. For example, both of the following queries return the same results: SELECT i.id, p.first_name, p.last_name ...
0
votes
1answer
23 views

AlwaysON AG synchronous commit mode disconnected transaction log effect and mitigation

I have an AlwaysON AG with one primary and one secondary replica in synchronous commit mode. The databases in the AG all have autogrowth disabled (standard policy within organisation). There is ...
0
votes
0answers
9 views

How to transfer DDL changes between different stages?

What technical solutions are available to track DDL changes and transfer them between different stages (e.g. DEV -> QA -> PROD) on postgreSQL databases? Is there a common mechanism to do that?
1
vote
1answer
12 views

best way for creating Index in mysql (multi-column/table)?

i have a big problem with my database.. I need a very fast query over 2 tables. 1. table: (node) ~42.500.000 entrys 2. table: (waynode ~51.200.000 entrys The following query is much to slow: ...
0
votes
0answers
7 views

News website in PostgreSQL -> how to best import the news (featured) images into wordpress?

some time ago I have posted a migration request topic: PostgreSQL to MySQL migration to use database for WordPress site - how to's? as I wanted to migrate PostgreSQL database to MySQL. The ...
-1
votes
1answer
17 views

How can I create a church attendance report system?

Please am pretty new to php and mysql. I have an assignment to create a church attendance system for our weekly services. The system would be able to know how many males and females came to church ...
3
votes
1answer
15 views

Can SSDT deploy SQL server service broker objects?

Can SQL Server Data Tools (SSDT) deploy sql server broker objects? (So contacts, message types, services, queues and so on.)
1
vote
1answer
22 views

Multiple SELECT With Multiple WHERE

I am stumped and need your help. I am trying to select three columns from my table where one of them is a VARCHAR and the other two are either "Y" or "N". SELECT CurrencyPair, Count(Accepted) As ...
1
vote
0answers
9 views

Replication prioroty

I have two MongoDB instances running on two servers (instance1 and instance2) and they are configured as a replica set. Instance1 is the primary and instance2 is the secondary. When instance1 was ...
-1
votes
0answers
10 views

INNER JOIN WHERE user id

I have 2 tables Table name: "as_users" Col 1: user_id Col 2: uid Col 3: email Col 4: username And Table name: "user_images" Col 1: uid Col 2: username Col 3: image The following code shows ...
0
votes
1answer
17 views

Sending an async notification to another database in PostgreSQL

Is there any way I can send a NOTIFY to a database other than the one that my connection has specified? [CLARIFICATION] Consider we have two databases within one instance of PostgreSQL. If you are ...
0
votes
0answers
5 views

downgrade mysql from 5.6 to 5.3/5.4

We have an issue in our server when we try to connect from A server using php v 5.6 to B server mysql 5.5 it throws an error saying " Failed to connect to MySQL: The server requested authentication ...
0
votes
1answer
13 views

Modeling Optional Column

I've got an optional column (residential) in one of my tables that is giving me trouble. If a Licensee intends to work w/ residential customers, they need to take an additional course (...
0
votes
1answer
29 views

Database design considerations for unused columns with every table has same schema

I am a web developer so I don't know a lot about databases. The company I joined recently has a very mature Desktop ERP built in .NET and SQL Server, they are providing services to huge corporate ...
2
votes
0answers
22 views

Implementing faceted search in PostgreSQL

I'm trying to figure out if it is possible to implement a faceted search (like the ones popular in online shops like Amazon) in a reasonably sane and efficient way in PostgreSQL. A faceted search ...
0
votes
0answers
12 views

Postgres: Refer to several other id's in a certain row

I am a postgres newbie, I struggle to execute this: I have a table of artists and their info (birth, death, style, etc..) Each row has a unique id_name varchar column has values like jones or adams ...
0
votes
1answer
6 views

What's the advantage of the inet datatype in Cassandra vs a plain text string?

What is the inet datatype really for? The documentation refers to its usage having something to do with Python but I'm not much of a Python guy so that aspect is beyond me. Is there any advantage to ...
2
votes
2answers
24 views

SUM and Group By Optimization

I use this query: SELECT logdate, SUM(bytes)/1024/1024/1024 as traffic, customer FROM `Logdata` WHERE customer is not null AND logdate >= "2016-07-01" AND ...
0
votes
0answers
8 views

Java Library to Dump MySQL Database to File [on hold]

I am looking for a Java library to embed into a Java web application to enable backup of a MySQL database to a zip file. The first question would be why not use MySQL dump, this is an option that we ...
1
vote
2answers
25 views

SSMS clean output window with sql instruction

How can i clean output window in SSMS using t-sql syntax? Is it possible ? Do you know any workarounds ?
0
votes
0answers
11 views

Issue with Linked Server query

I have a job which fetches data from an Oracle 12c database and inserts into a SQL Server 2012 database, via a linked server from the SQL side. It's a simple Select * statement and just pulls in any ...
0
votes
0answers
11 views

Identify duplicates and apply logic

I have a largish 27mil row table. The table contains a large number of duplicate string values due to case variance. All rows have the string column and also one additional numerical column, and I ...
0
votes
0answers
10 views

Can a snapshot be “disconnected” from the app logon, to keep ONLY the immediate changes?

Can a snapshot be "disconnected" from the app logon, to keep ONLY the immediate changes before that disconnection, without changes subsequent to the disconnection being written to the snapshot? I want ...
1
vote
0answers
4 views

Why restore a single node of a cluster?

We were reviewing the restore documentation for Cassandra here, and noted it made the following distinction between restoring a single node or an entire cluster: If restoring a single node, you ...
0
votes
1answer
18 views

How to generate list of dates — ie every day for the past 2 years? (sql server)

We're using a business intelligence system and need to load a list of dates so we can flag them as 'last week' or 'last 12 months' or some dynamic value. I'm wondering what's the simplest way to ...
0
votes
0answers
25 views

Table optimization in SQL Server with huge data [on hold]

I have a table in one of my databases which has 20 billion rows and keeps on increasing daily. Even if I do a select *, it takes a lot of time to fetch all records. There s only one primary key in ...
1
vote
0answers
14 views

Inserting rows from one multimillion rows table to another

I have a transactional (OLTP) database with tables that have about 100 million rows. I have on another server a data warehouse with similar size tables. I would like to update the data warehouse close ...
1
vote
0answers
7 views

Shouldn't DISCARD PLANS re-evaluate every function definition in postgres?

Hi have a set of functions that take a row of a table (let's call it bookings) as input parameters. Some of these functions call other functions, and they are used to calculate a materialized view. ...
0
votes
1answer
28 views

OVER and PARTITION BY for db size change

I have the following column below. I am not too familiar with the OVER function. Question is, will the column usage_change_mb be the daily change (from daily snapshots) or an average change of all the ...
2
votes
2answers
38 views

MariaDB 10.1.16 on Ubuntu fails to start: WSREP Failed to recover position

I'm using 10.1.16-MariaDB-1~xenial from the official MariaDB apt repository for 10.1 [stable], via the University of Texas mirror. I had a perfectly functioning MariaDB Galera cluster setup on 3 ...
2
votes
1answer
14 views

Is there a way to find out what queries are run the most against a particular table?

We have been experiencing issues with slowness regarding our Master Data Services application. So we have looked to see which tables have the highest value of range scans, singleton lookups, page lock ...
0
votes
0answers
6 views

postgres create a view with data transformation rules

I was hoping someone could point me to a resource that can help me solve my problem. I have a largish dataset (25 Million rows), and I need to export the table based on a set of rules. 6 rules to ...
1
vote
1answer
14 views

Visual Studio Database Project

I work in a company that is deeply ingrained in .Net programming. I am responsible for managing a couple SQL Servers, with about a dozen databases in total. Our programming manager recently ...
1
vote
0answers
13 views

How to Move a whole partition to another tabel on another database?

Database: Oracle 12c I want to take single partition, or a set of partitions, disconnect it from a Table, or set of tables on DB1 and move it to another table on another database. I would like to ...
1
vote
1answer
20 views

MySQL unique static ID

I need to get an unique static ID that is not changeable by the users, and if the user copies the database to another server this static ID is different. Background My company wants to sell our app ...
0
votes
1answer
13 views

calculate average of a class where students offer different number of subjects

I am trying to calculate the class average of a class where students can hold different amounts of subjects (e.g.: two students in a class of which one takes 3 subjects and the other 2). How do I get ...
-1
votes
1answer
24 views

unique constraint on a column with duplicate values

How to create unique constraint on a column with duplicate values,without disturbing the existing data.i have already tried the method below, To create a normal index first and then create a unique ...
0
votes
0answers
6 views

repmgr 3.0.4 and postgres 9.4 on ubuntu (ERROR: replication slot “repmgr_slot_2” does not exist)

I'm not a DBA but I have been tasked with setting up a database and streaming replication and repmgr is the tool I have decided to use. The master goes on fine and I can see it registered in the ...

15 30 50 per page