-1
votes
1answer
27 views

Server Specifications for Web Application [on hold]

I am trying to select the configuration for a web application built in PHP 5.5 and MySQL 5.1. I will also be deploying PHPmyAdmin for the MySQL database. Both the web application and the database will ...
1
vote
1answer
15 views

Renaming a column in a materialized view with an unknown name

I have a materialized view with an unknown column name, and I need to give that column a name. I can't just recreate the view because it took a long time to create. dba=# \d temp_name_relationships; ...
4
votes
2answers
26 views

Database Design (how to handle subclass & superclass)

I'm wondering what is the best approach to this type of problem (I'm a highschooler so don't have practical knowledge on the subject): Let's say I want to store information about employees at a zoo. ...
0
votes
0answers
26 views

Are read replicas affected by heavy writtings in master?

This is my problem: Sometimes one long lasting query (>60 secs, and I have a lot of those) which is always a SELECT makes my whole application stops working properly up until the query is solved. ...
0
votes
1answer
18 views

Do dormant databases impact server performance?

On our web server, my team has been creating new databases in MySQL to manage backups. They simply create new database_DATE and copy over our live site. Which made me think today... Can having a ...
-1
votes
1answer
23 views

what is force application? What are its advantages and disadvantages? [on hold]

I have googled what the force application about database is but I haven't found satisfactory answer. What is force application? What are its advantages and disadvantages?
0
votes
0answers
23 views

Design: How to account for a custom product in a transaction item table

This question is related to Database Design: inventory and sales system? So for example a burger is a Product which is made up of Component bun, meat, cheese, pickles etc. When this burger is sold it ...
0
votes
2answers
71 views

Convert Function

I am working on converting a few dates to make them easier to read and when I call upon the convert function to do so, they simply don't convert. When I run the queries they look the same. The code is ...
0
votes
1answer
25 views

SQL Server Management Studio - Processor counters for different sessions do not add up

In SQL Server Management Studio, I have two sessions. The workload for each session is: Session 1: while loop to select top items from one table; Session 2: while loop to update statistics of ...
0
votes
0answers
45 views

Is it possible to inspect data in NORECOVERY mode [duplicate]

We are trying to restore a dataset to our online database that was inadvertently deleted. However we aren't quite sure as to when. Is it possible to restore a test database using NORECOVERY, but still ...
-1
votes
0answers
25 views

How Can I Optimize a query using SUM fields in one table, Group by a fields in other table [on hold]

I have a code as bellow SELECT T1.CustomerID, COUNT(T2.TransID) AS NoOfTrans, SUM(T2.Qty) AS TotalQty, SUM(isnull(T2.DiscountAmount,0)) AS TotalDiscountAmount, SUM(...
0
votes
0answers
24 views

Can InnoDB use a clustered index as a covering index?

The scenario I have in mind is a query like: SELECT id FROM table WHERE id = ? or equivalently, SELECT 1 FROM table WHERE id = ? So here's some background: In a B+ tree (which InnoDB uses as ...
0
votes
1answer
11 views

Compound shard key with _id field

I have documents like: {_id: "someid1", "bar": "somevaluebar1"} {_id: "someid2", "foo": "somevaluefoo2", "bar": "somevaluebar2"} {_id: "someid3", "foo": "somevaluefoo3", "zoo": "somevaluezoo3"} {_id: ...
0
votes
1answer
40 views

MySql How to rollback my database to a certain point in time the fastest way?

I'm currently working in a testing database and we are not cleaning up after test because of our current configuration and we probably aren't changing that configuration soon, we are currently using a ...
0
votes
1answer
20 views

MySQL issue - startup

I have Percona Server 5.6 running in linux platform.. recently I faced an issue where mysql instance was continuously restarting for no reason.. mysql logs had this error: [ERROR] InnoDB: File ./...
7
votes
3answers
465 views

Single service account running all SQL Servers

Is there any negative performance impact for using the same service account and agent account to run SQL Server and SQL Agent respectively for all SQL server instances running at a small company of ...
1
vote
1answer
20 views

PROCEDURE ANALYSE suggests to turn timestamp into CHAR(19)

Using Procedure Analyse() under MySQL 5.6.30 on a table with about 4 million rows makes the following recommendations: change timestamp to char(19) tinyint to ENUM (I noticed it's overzealous with ...
1
vote
1answer
42 views

Can I iterate a value depending if the previous is what I want?

Suppose that I have this table in PostgreSQL 9.4: CREATE TABLE trajs ( id serial NOT NULL PRIMARY KEY, obj_id integer, traj_id integer, geom geometry, t timestamp without time ...
0
votes
0answers
11 views

MongoDB DUPLICATE non-sharded collection was created when running mongoimport on 2 different query routers

I am running multiple mongoimport processes to import a collection lc_data into a mongo cluster. This collection is NOT sharded and its primary server is the shard-01 server. mongos> db.lc_data....
1
vote
0answers
113 views

HASH JOIN hint doesn't work. but OPTION (HASH JOIN) does [on hold]

I have a query involving 3 tables and 2 inner joins. The optimiser is choosing to join them together with LOOP joins, but I know HASH joins will be better. So I tried changing the joins to be INNER ...
3
votes
1answer
53 views

Self-JOIN with occurrence count

I use PostgreSQL 9.4 and I have a table called certificates containing the following columns: CREATE TABLE certificates ( id serial PRIMARY KEY, common_name varchar(255) NOT NULL, state ...
0
votes
0answers
21 views

one Comment table for all content types or many tables for each content type

I have a very similar question with this stack overflow link but since its not answered I had to post it again. I have many place which people can place comment: file download, biography, blog and etc....
3
votes
1answer
69 views

Foreign Key Constraint Set Back to Trusted

We have some production tables with numerous constraints that are not trusted at the moment. We're having them checked/trusted so they can be used again. We know that the optimizer has not been ...
1
vote
2answers
29 views

Bridge table question

Should be a simple questions, I just want to make sure. If I had 2 tables I want to bridge, for example food (food_id, foodname, ...) and a plate (plate_id, platetype, ..). When the tables are ...
0
votes
0answers
30 views

Final Unique Index for Person and Companies?

I am creating a persons schema where the the person table must be very simple because it will be father of other tables that completes it, but a person can be fisical or legal, so I wont put any ...
0
votes
0answers
22 views

trigger/trigger function to work on all column but 1

I need a trigger/trigger function to fire on all insert/updates for all changes in all columns but 1 if a user changes the value in that column, it is not significant and the trigger does not need to ...
0
votes
1answer
54 views

How do I save result of a join to another table?

In PostgreSQL I can save result if SELECT to another table with SELECT INTO: SELECT id INTO new_record_ids FROM new_table EXCEPT SELECT id FROM old_table ORDER BY id; However this doesn't ...
0
votes
1answer
31 views

Bulk Update Based Off Values In A Table

In Sql Server 2014 I need to run an Update statement that will update NULL values with values found previously in the table. To better illustrate, here is a very small subset of my data Create Table ...
0
votes
0answers
30 views

Backup /www/ directory and all mysql databases

I'm trying to write simple shell script which will zip all databases + www directory. I don't know what is the problem but I've got wired output. I've got zip with .sql file full of hieroglyphics... ...
-1
votes
0answers
34 views

sp_Blitz github documentation [closed]

In "Writing sp_Blitz Output to a Table" per the GitHub docs: The docs say the fully qualified table is made up of '@OutputDatabaseName = '', @OutputSchemaName = '', @OutputDatabaseName = ''; 1. That ...
0
votes
1answer
39 views

Unable to view partition table in a schema

I am using oracle 11g enterprise edition, I have created a schema as "TESTSCHEMA" and in it i have created a partition table as "sales_test". The query for the table, create table sales_test (...
-1
votes
1answer
15 views

how to set schedule db2 automatic delete backup after 3 days from data studio

I can successfully set backup of Data base but, I want to Set Schedule from IBM Data studio for automatic delete database backup after few Days?
-3
votes
0answers
11 views

How to configure port rs232 [closed]

I would how to develop application with php/C#/java for configuring rs232 port between different machines.
0
votes
0answers
17 views

determine what prevented Postgres from starting

I'm in a bit of a quandry over a test machine that is running a Java Web App on top of a Postgres database. When I started the machine today (running Centos 6.1), I navigated to my site page and my ...
0
votes
1answer
38 views

how to convert integer zipcodes

My question is how do you put my zip code 07601 as an integer? I've tried to google several times this question and never got an answer. The reason I'm doing this is to because its important ...
1
vote
0answers
47 views

How does one map nested multi valued attributes?

Let's say one has an Entity E. E has a multivalue Attribute M1 and a simple attribute A1. However M1 consists again of a multivalue Attribute M2 and a simple Attribute A2. How would one map this ...
0
votes
0answers
19 views

conditional trigger function for history table

I have a history table that tracks modifications to attributes/geometry for each layer I need to set a condition that if the attribute is 'Y' for the column "export" in the "span1" layer, the trigger ...
4
votes
4answers
135 views

A few huge instances or many small ones

I recently inherited an environment with around 4000+ databases distributed between 21 instances on 3 huge physical servers. Databases are distributed between different instances based on the name, so ...
0
votes
1answer
22 views

Messed up output

Whenever I run sql statements like (select * from employees;) to display long outputs, the output is always unaligned, scattered and very difficult for me to read. I just signed up here and I hope ...
0
votes
1answer
61 views

Select distinct values of two columns as single [duplicate]

For starters: yes, I've seen there are lots of questions on combining two/multiple columns - but so far I neither found the answer to my question nor something to get me started trying further (which ...
1
vote
0answers
22 views

Key/value table: what is a good way to organize it if value could be foreign key?

Suppose a have a structure of two tables Table Key names: |_Key name_|_Parent_key_id_| | key1 | NULL | | key2 | key1 | Table Key values: |_Key__|_Value__|_Version__| | ...
0
votes
0answers
16 views

failed to retrieve rpm info for /var/lib/mysql/ib_logfile0

SELinux is preventing /usr/sbin/mysqld from open access on the file /var/lib/mysql/ib_logfile0. For complete SELinux messages. run Jun 21 16:35:39 localhost.localdomain python[17438]: SELinux is ...
17
votes
4answers
2k views

How to limit maximum number of rows in a table to just 1

I have a configuration table in my SQL Server database and this table should only ever have one row. To help future developers understand this I'd like to prevent more than one row of data being added....
0
votes
1answer
34 views

How to check programmatically which replica I'm connected to

I have an AlwaysOn Availability Group on MS-SQLServer (2 replicas) and a C# application which sends queries to the Availability Group Listener. How can I check which replica is responding my queries? ...
0
votes
0answers
16 views

Validation Errors in SSIS Package when columns are mapped correctly

I have a SSIS package that I am working on. As soon as I open the SSIS package I am given the following error: Validation error. Populate Organisations Table: Organisation Table destination: '...
-1
votes
0answers
23 views

custom autoincremented colums [closed]

I want to generate custom column like if name is prakash then pk colu should be pk1001 where 1001 is the autoincrement . The firstname's 2 leters should come with the pk which is autoincremented ? ...
0
votes
1answer
28 views

Multiple subqueries in columns with joins to return multiple rows

I have a table which stores id(primary key) of users and not their names (Names are stored in another master table) and also the the department id of user and not the name of the departments and there ...
0
votes
0answers
12 views

Migration query - Oracle

I have two physical servers, hosting 6 two node RAC databases running in 11.2.0.3 version (both grid and database). I'm told to have the grid software in 11.2.0.4 version and the databases in the ...

15 30 50 per page