0
votes
1answer
36 views

JOIN on 3 tables being slow

everyone. Can't figure out what indices are missing or how to rephrase my query. I created about a milllion of test entries in each table to see performance. Query takes about 1.5 seconds which is ...
0
votes
2answers
37 views

Reducing database size to restore to SQL Server Express

I have a SQL Server 2008 R2 database, about 15 GB. I want to copy it for a partner, who is using SQL Server 2008 R2 Express. I deleted many tables and rows, and now I am sure that the data is ...
1
vote
0answers
14 views

Mongo stuck on save

We have a single node of Mongo holding data in a single collection. We run it on windows 2008 64-bit machine with 128 GB RAM. The size of the collection is ~2TB holding ~200M items. Lately, when we ...
1
vote
0answers
29 views

Importing data into Oracle 12

I got a set of files from a client which are, as far as I can tell, copies of a database in Oracle 11. Each folder has the following structure: - init<DB>.ora - orapw<DB> - arch - dbf ...
0
votes
1answer
11 views

Stored Procedure Performance Issue in Sharepoint Report

We have a report stored procedure that runs in about 1 minute in production; however, when executed from the Sharepoint it populates, it rus for over 20 minutes, with exactly the same parameters. ...
0
votes
1answer
9 views

psql: could not connect to server: No such file or directory

The error in its entirety reads: psql: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket ...
0
votes
1answer
20 views

Bulk insert in multiple tables

I have two tables on which I perform some bulk inserts: key: key_id(pk), key_name related_key: key_id(fk), related_key_id First Insert: values_data = "($$key_1$$), ($$key_2$$)" INSERT INTO key ...
0
votes
2answers
23 views

Connection problems with ManagePartition executable

I'm currently running SQL Server 2014 and we have some tables that have been partitioned and I'm trying to use the ManagePartition application here (http://sqlpartitionmgmt.codeplex.com/) I've typed ...
1
vote
1answer
25 views

Adding time to an event that runs on a weekly basis

I have this event that runs every Thursday CREATE EVENT le_drop_database ON SCHEDULE EVERY 1 WEEK STARTS CURRENT_DATE + INTERVAL 3 - WEEKDAY(CURRENT_DATE) DAY DO BEGIN drop database carbon; ...
2
votes
3answers
96 views

Tracking events in a task database

In designing a task database with the usual set of tables (Users, Tasks etc), I'm wondering if there is an accepted way to track changes to fields in the task table? I could just provide a text log ...
0
votes
0answers
9 views

RAID configuration for mysql

I attached 4 10G disks to mysql Server and I used RAID 0 but still same mysql performance the same, Do I have to change configuration in my.cnf to let mysql know about RAID 0
1
vote
2answers
117 views

RAID configuration for mysql

I attached 4 10G disks to mysql Server and I used RAID 0 but still same mysql performance the same, Do I have to change configuration in my.cnf to let mysql know about RAID 0. this is my mount ...
0
votes
0answers
38 views

table check constraint, greater than > not accepting

CONSTRAINT CK_BABY_YOUTH_CHILD CHECK (case when Passenger_Type='Baby' then Reference_ID >=0) This is my table check constraint, i have no idea why sql server is not accepting ">". Please ...
0
votes
0answers
16 views

Oracle Buffer Pool TARGET_SIZE is different from CURRENT_SIZE, but RESIZE_STATE is STATIC

According to the documentation for V$BUFFER_POOL, TARGET_SIZE shows that target size when resizing, but should be the same as CURRENT_SIZE if RESIZE_STATE is STATIC. However, on one of our databases ...
0
votes
0answers
19 views

API on top of postgresql

I'm looking for one or several API's that can be put on top of postgres to make data input more dynamic. What I'm looking for is something that can handle a wider range of protocols and differently ...
0
votes
1answer
38 views

What's faster: two UPDATEs with WHERE (in / not in) or one UPDATE with CASE?

What's best performance wise, two separate UPDATEs: UPDATE table1 SET enabled = 0 WHERE code NOT IN ( SELECT id FROM table2 ); UPDATE table1 SET enabled = 1 WHERE ...
0
votes
0answers
10 views

MySQL - Moving binary logs to Network Server On Windows

Is it possible to move the Binary logs for MySQL (on Windows), to a different physical server? My MySQL Databases are MySQL 5.5. (Bearing in mind that ultimately this will be a Master DB, and there ...
1
vote
0answers
11 views

create trigger hangs

I have a trigger function that just copies inserted values to another table. Then, each night I need to drop and recreate this trigger for some export operation. --trigger function CREATE OR ...
0
votes
2answers
56 views

Calculate Time difference between a datetime format with the current datetime

Hi I would like to calculate the difference between a past datetime with the current datetime with the result as a [hh]:mm format.
1
vote
1answer
22 views

Table is dropped but ibd file still exists

I was dropping some unwanted tables I have in the MySQL. When I run a drop table, its showing table doesnot exists. But when a check in the data directory, the .ibd file exists and its almost 1GB. How ...
0
votes
2answers
61 views

What do cursors do internally?

I was optimizing a stored procedure written in cursors (DECLARE cur_name CURSOR... The client saw this SP ran for more than a day so, my manager assigned this to me. Upon searching, I used table ...
0
votes
2answers
53 views

Dynamic Table partitioning on a daily basis

I have a SQL Server database which contains two tables -- Acks and Logs. These two tables are related in logic but not in a relational database way. Basically, every message that comes in gets saved ...
0
votes
2answers
26 views

Rank variable value in MySQL is always being set to null

In a sample procedure I am trying to find the rank the of the cities according to the number of offices. I have a Location Table and an Office Table and a location can have multiple offices ...
0
votes
1answer
12 views

Mongo import error: exception:read error, or input line too long (max length: 16777216)

I have a shareded collection which I'm trying to migrate from an existing production Cluster running v 2.4 to a new one running 2.6. As both clusters are shareded, I'm using mongoexport from the old ...
0
votes
1answer
21 views

MySQL: How to sync on demand beetwen two database in the same server

I'll like to know if it's possible to have a systeme on synchronisation beetween two database in the same server. I have a production database in my server , i want a dev database (same database with ...
0
votes
0answers
28 views

sql server 2012 execute as query [on hold]

Please look at this question and i have two options You administer a Microsoft SQL Server 2012 database named ContosoDb. The database contains a table named Suppliers and a column named IsActive in ...
1
vote
1answer
31 views

Should I drop this column or is there a query that can achieve a results table without duplicate columns?

I use a column named active in several of my database tables to adjust whether a particular entry/row/user/etc should be included in future query result tables instead of deleting the information. ...
0
votes
0answers
10 views

long mysql insert and update script user variables appear to be lost while running script

I have a mysql database table called 'dash_something' dash_something ------------- date, DATE *this is the date of the summary type, CHAR(10) entity, CHAR(25) number_of_emails_1, INT ...
0
votes
1answer
19 views

In what way are Access tables linked with SQL server?

I have a mdb file with lots of OBDC linked tables that are linked to the tables in SQL server elsewhere. I can not see any information on how they are "linked". It is a little scary not knowing ...
0
votes
1answer
35 views

MySQL JDBC does not behaves as the MySQL Workbench

I'm running the following from the MySQL Workbench, and from my local tomcat using jdbc. START TRANSACTION; CREATE SCHEMA IF NOT EXISTS `ROOT`; CREATE TABLE IF NOT EXISTS `ROOT`.`all_tables` ( ...
1
vote
0answers
34 views

Many small queries or one single query

This is not exactly a question, more of a survey. Here at BlackBean we have a time series aggregation and analysis platform built on top of MySQL, where each client have your own database, and each ...
0
votes
1answer
19 views

Separation of users columns in another table

I've got a quite a lot of columns on the users table and I have been cleaning it up recently. Now since I'm searching over the users I figured it would improve performance if I separated verification ...
1
vote
1answer
24 views

Indexing the difference between two columns in MySQL

Is there a way to optimize/index a query that sorts the difference between two columns. I have a modest sized table of 5 million rows that I'm trying to do the following: SELECT pk_column, column_x, ...
1
vote
1answer
47 views

Can I use attribute name to identify XML element?

Rather than using the element index COLUMN[1]/@value below, is it possible to retrieve the column value by specifying an attribute name such as: COLUMN[@name=”Prod_ID”]/@value? When I tried, I got ...
1
vote
2answers
164 views

How to get Identity Column to jump ahead (by say 1000) on SQL Server 2012

I am using SQL Server 2012 and I would like to keep my pre-existing data but to cause the ID (identity) column to skip by 2000 rows. Why is this happening? I have a scenario where I may have ...
0
votes
2answers
24 views

Duplicate Statistics?

I have been looking at poorly performing stored procedure that performs well for larger customer databases. I believe the reason is that SQL Server has not had time to properly create good statistics ...
0
votes
3answers
39 views

PostgreSQL equivalent of MySQL query variables?

Is there a straightforward way to adapt these types of MySQL queries to PostgreSQL: setting variables in MySQL like set @aintconst = -333 set @arealconst = -9.999 It seems not. Assigning ...
0
votes
0answers
65 views

Memory Issue - SQL Server 2008r2

I am trying to troubleshoot a memory issue on a 2008r2 instance. Very high resource semaphore waits are present and a general slowdown of queries,backups,dbcc checks. Only one instance of SQL Server ...
0
votes
1answer
18 views

Allow filtering not working as expected

I'm having issues with getting ALLOW FILTERING to work. In our Cassandra 1.2 database, we have a table like this: CREATE TABLE some_table partition_key text, other_key text, non_key ...
1
vote
1answer
17 views

How To Merge Database Projects on Visual Studio 2013

Can I have multiple database projects to the same SQL Server database? Like, one main project referencing multiple subprojects. I have an application which multiple modules and each modules has it's ...
0
votes
1answer
59 views

queries for hierarchical data

This table is a questions and answers CMS and i want to know how data is fetched from these tables. +------+----------+-------+ | id | parentid | type | +------+----------+-------+ | 1 | 0 ...
1
vote
1answer
35 views

SQLDriverConnect fails when attempting to connect to Failover_Partner

SQLDriverConnect fails when attempting to connect to Failover_Partner. Connection string being used: Driver={SQL Native Client};Failover_Partner=tcp:dby;Server=tcp:dbx; ...
1
vote
1answer
17 views

No results from traceid from sys.fn_trace_getinfo(0);

SELECT DISTINCT(eventid) FROM sys.fn_trace_geteventinfo(#); The above command returns no results. There should be a bunch of trace event id being traced.
1
vote
1answer
30 views

PL/SQL operating system call

I'm trying to lauch a system call from Oracle Apex, directly or indirectly. It seems to only accept PL/SQL procedures, so I iterated towards this: begin :p3_request_id := sequence.nextval; ...
0
votes
1answer
9 views

Type of an id field that references another id field

I'm on postgresql. I have a table user (id serial not null) and another table client(id) i need to create a : foreign key client(id) references user(id). What the client(id) type should be? Int or ...
12
votes
0answers
58 views

How to calculate/store Top 10 in a tabular model?

We have recently created an SSAS tabular model so our users can access it via PowerView. We have a measure on one of our fact tables to get the TotalActiveItems using a formula: ...
5
votes
3answers
82 views

Avamar SQL Agent running against live SQL Server databases

We use a large company as our service provider. The tech people from that service company are pushing very hard to install something called the Avamar SQL Agent which purportedly will be used to ...
0
votes
0answers
35 views

SQL Server Data access does not connect unless we provide the port number

I have configured SQL Server 2008 R2 named instance on Windows Server 2008 R2 to listen to only one IP,1433. Some Office 2010 clients are trying to connect using the external data to SQL Server using ...
0
votes
1answer
44 views

deleting a table referenced by many foreign keys

I have a table that I want to drop and create again, because I want to add the IDENTITY property to a column, wich is not possible directly. The problem is that I can't drop it, because my column is ...
1
vote
1answer
39 views

Adding foreign keys constraint on databases used

We have a server with about 20 databases, all duplicates of the same original db, and we just noticed the original is missing all the foreign keys constraint for some unknown reason. So of course all ...

15 30 50 per page