2
votes
1answer
2k views

Unique insert performance: Primary Key vs Unique Index

I have a table of unique values (domains_unique), with collumn domain varchar(255), with more than 20 mil records. What's the fastest way to insert into the table, by keeping the domain unique ...
6
votes
2answers
401 views

SSIS Validation slow. OLTP OLAP running on same server

I have four identical servers 2 are used in production and the other two are demo machines/emergency fail over boxes. The more powerful machine a 16 core 127 gigs of Ram hosts both our Datawarehouse ...
1
vote
1answer
134 views

DB2 9.7 - Find rows inserted by a specific trigger

We are auditing a table TRANSACTIONS that inserts a row in HISTORY_TRANSACTIONS when specific columns are changed. These inserts happen through a number of triggers defined on TRANSACTIONS table. Is ...
2
votes
0answers
97 views

SQL Server 2008 Restore from D2D

In that past year we started using a D2D network device to store our SQL Server backups. This device does dedup and compression. It looks just like any standard CIFS share (\\d2d\sql_backups\...). ...
1
vote
1answer
1k views

Finding out the hosts blocked by mysql server

Can someone tell me how to list the hosts which are blocked by the mysql server due to the reason that they crossed the limit of max_connect_errors. Is there any table in which MySQL server keeps this ...
0
votes
0answers
90 views

What would this non-'unique index with a unique search condition` query lock?

I am not sure about this part of the transaction manual For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE), UPDATE, and DELETE statements, locking depends on whether the statement ...
4
votes
0answers
730 views

Receiving error Error: 18059, Severity: 20, State: 1 in the SQL Logs

I'm using SQL Server 2008 Sp3 Lately I'm having errors in the SQL Logs: Error: 18059, Severity: 20, State: 1. The connection has been dropped because the principal that opened it ...
1
vote
1answer
133 views

MySQL query to search string in Master-Child tables and return all rows with Master-Child relation

Need MySQL query Help. Please find schema below: Table1 PK_id Table1_Title Table1_Description 1 Test1 This is Test1 2 Test2 This is Test2 Table2 FK_id ...
3
votes
1answer
94 views

What to do with duplicate lookup information

I have multiple databases that I want to store in one data warehouse database. I am wondering how I design the import process to handle multiple lookup tables. For example, say I have 5 databases all ...
2
votes
2answers
331 views

Negative numbers in InnoDB Status

There are some negative numbers displayed in the InnoDB Engine Status output. Anybody has encountered this or know why this happens ? ---------------------- BUFFER POOL AND MEMORY ...
1
vote
1answer
51 views

Column order for better index

let say I have two tables like tbl_parent and tbl_children (just as an example), in the first table I have parent_id, and in the second one I (will) have something like child_id plus the parent_id, ...
2
votes
1answer
228 views

LoadBalancing JDBC DataSource Connect without URL

When using JDBC I like the new DataSource-way to establish the connection. Further I like the isolated set-Methods for the properties like setUser, setPassword, setDriverType, setServerName, ...
1
vote
2answers
106 views

Do I need a locking read?

I am inserting rows in a table, based on a value and on the existence of a row, which I get from SELECT statements. This function can be run concurrently, so I need to do some extra obviously. The ...
0
votes
1answer
500 views

can not execute LIMIT on sql Developer

I am trying to execute following on sqlDeveloper SELECT salary FROM emp ORDER BY salary DESC LIMIT 4, 1; But it is throwing following error: ORA-00933: SQL command not properly ended 00933. 00000 ...
7
votes
1answer
919 views

Why does sql server need to convert count(*) result into int before comparing it with an int variable?

I have many queries in my application where in the having clause, I have comparison of count aggregate function with int variable. In the query plans, I can see an implicit_convert before the ...
1
vote
4answers
156 views

Normalization of DB

I have designed a database using MySQL likewise My question is what else i can do to normalize the DB, for now i am using InnoDB engine for the table to maintain the relation among different tables. ...
0
votes
0answers
148 views

Materialized view for a yet-to-be-defined DBlink

In our product we have a main application with an oracle 11g DB and an optional module with another DB. We want the two to communicate through a dblink and I was told to put some code for the ...
3
votes
1answer
461 views

LIKE character length limitation

The background to this question can be found here. The following part of my stored procedure does not work. Is there a character length limitation for the LIKE clause? t1.ProductList sometimes can be ...
0
votes
1answer
45 views

Using multiple server databases

I was just seeking some higher advice on whether or not having your main data on one database, then having separate server database to use for frequent updating and reading will prove to be an ...
0
votes
0answers
232 views

Mysql Incremental Backup and point in time recovery

I'm writing a shell script using the concept of binary logs for point in time recovery. Now, the scenario is such that a full-backup will happen every alternate day and Incremental backup should be ...
1
vote
1answer
202 views

Postgresql Two-phase Commit Transaction Identifier

Is it possible to perform a two-phase commit in Postgresql when the databases exist on the same server? As a simple test, I would connect to the first database and run: BEGIN; PREPARE TRANSACTION ...
0
votes
2answers
256 views

Naming foreign key columns

Now I hear that the best practice for naming foreign key columns is the name of the table and field (and maybe the function if there are multiple foreign keys to the same table), for example, a ...
4
votes
1answer
272 views

Is it possible in SQL Server to change default “order by” direction from asc to desc?

This question came up in a discussion at work... given the following T-SQL statement: select firstname, lastname from users order by lastname; the default sort order on the order by clause is asc. ...
1
vote
1answer
566 views

Should a table be partitioned before or after an INSERT?

I have a fairly simple question that is proving hard to search for. I need to create a table that will be partitioned and into which (lots of) data will be loaded. Is it more efficient to create the ...
2
votes
1answer
959 views

AWS performance of RDS with provisioned IOPS vs EC2

Has anyone done a performance comparison of AWS RDS with the new provisioned IOPS vs EC2? I've found plenty of non-high IOPS RDS vs EC2 but nothing with the new high IOPS feature in RDS.
5
votes
2answers
339 views

Stored Procedure as Create Table proxy?

With SQL Server it was my understanding, I thought, that you could elevate a users permissions with specific constraints. For example, you need a user to create a specific table object in a specific ...
0
votes
1answer
146 views

Can this array group count query be improved?

So I have the following query explain analyze with tags as ( select unnest(tags) as tag_name from tasks where user_id = 1 ) select count(9), tag_name from tags ...
0
votes
1answer
560 views

Convert rows to columns in SSIS. Unpivot?

If I have data like this "","",WAREHOUSE ID,1,2,3,4,5... "","",WAREHOUSE CODE,BOS,HOU,LAX,NYC,CHI... "","",WAREHOUSE NAME,BOSTON,HOUSTON,LOS ANGELES,NEW YORK CITY,CHICAGO... But want to transform ...
0
votes
1answer
385 views

How to remove symbol from file

I am using ssis to generate some .dat files which are then sent to linux server for automated load. It looks as windows add some symbol character in file which is not easily identifiable first but if ...
1
vote
2answers
218 views

Are MySQL transactions under-utilised?

I have a vague understanding of transactions that it means you can help the server understand that a series of queries are related. Scenario : Suppose I have a series of queries which creates a user ...
4
votes
2answers
5k views

SAN block size for SQL Server on 4KB NTFS

A potential customer wants to evaluate our storage system. They run Windows 2008R2 x64 with 4KB NTFS on a virtual test machine they've sent us. They did not seem to know this at hand, so I think it's ...
0
votes
1answer
1k views

Creating new database and insert values in Oracle 10g xe hr account?

I am new to Oracle 10g xe. When I log into hr account, how do I start creating new database and insert values? My case study is a five aside football league, where the organizer wants to know ...
4
votes
1answer
1k views

SQL Server Report Manager 404 using HTTPS

OK. I have scoured the Internet for information on trying to fix this and found nothing that deals with my situation. I started here, that lead me to here, that lead me to looking at netsh commands ...
8
votes
2answers
258 views

Where can I find the SQL standard document?

Where can I find a legal copy of the ISO SQL 2008 standard?
4
votes
2answers
802 views

Can I recover a TDE certificate by restoring the MASTER database?

(We are, fortunately, not currently in this situation, just planning ahead to see what our options would be if it ever occurred.) For a database encrypted with Transparent Date Encryption (TDE), a ...
1
vote
2answers
850 views

Oracle insert max from two date

I want to create an insert statement in a PL/SQL Script that inserts the larger of two different values. Conceptually, what I want to do is something like Insert into MYTABLE (DATE_INSERT) VALUE ...
3
votes
1answer
96 views

Pricing of databases in Azure

I am a little bit confused about pricing for Data in Azure. I found on one MS Blog that 50GB has a price of $125. Missing part for me is, if I have needs only for a database in the cloud: Do I pay ...
0
votes
0answers
106 views

Performance Optimising MySQL query

I have this query in my mysql database, when i execute this, it takes about 4 sec. To give me the result (on xampp 1.8.0 with mysql 5.5) I was wondering if there is any way to enhance this query so ...
0
votes
1answer
55 views

Check for records that break a foreign constraint (created with foreign_key_checks = 0)?

Is there an easy way to check for any records in a table that breaks any constraint? The constraint was created on a populated table using "foreign_key_checks=0".
4
votes
2answers
726 views

SQL Server replication for off site copy

We have our Primary SQL Servers in-house (15 primary servers at the moment (500 databases approx overall), most of the servers have hex core processors). These are mirrored to other backup servers in ...
1
vote
1answer
832 views

Why does MATCH() give Score 0, if there are less rows in the database?

I followed this example from the Mysql Documentation: CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), body TEXT, FULLTEXT ...
2
votes
2answers
6k views

How to set Password for sqlplus /as sysdba

I am new to Oracle. I would like to know how to set login password for sqlplus / as sysdba in oracle 11g. I want to set the password for my next login, i dont want to login as sqlplus / as sysdba ...
1
vote
1answer
112 views

Mysql query - find out 1000th row from a table for each user

Lets say I have a table where we log activities of user, I need to find out created_at of the 1000th activity of each user.. Following query works fine for one user.. select `created_at` from ...
9
votes
2answers
2k views

Why are non-digits LIKE [0-9]?

My server's default collation is Latin1_General_CI_AS, as determined by this query: SELECT SERVERPROPERTY('Collation') AS Collation; I was surprised to discover that with this collation I can match ...
0
votes
1answer
737 views

Does TRUNCATE TABLE affects isolation level in Sql Server?

As I am working on the project which has SQL SERVER as a database....I'm maintaining isolation level in my project where I enabled snapshot isolation level for my project.... As I have to make some ...
0
votes
0answers
2k views

How to use SUBSTRING using REGEXP in MySQL

I have the following situation. I have to substring regular expression from description using MySQL. Description: Lorem D9801 ipsum dolor sit amet Where D9801 is REGEXP. Every strong text ...
1
vote
1answer
109 views

Does a transaction cover the subroutines?

When I begin transaction and exec a stored procedure, does that transaction cover the changes made by the stored procedure I executed? Would a rollback transaction cancel the changes made by the ...
4
votes
1answer
332 views

Safe way to stop/abort REINDEX

I am running a REINDEX but it takes long time and still working. The application using the DB is not responding right now. Is there a safe way to stop it and do it another time? PostgreSQL version is ...
-7
votes
2answers
107 views

I have table with 17 Indexes if i add 1 more index for search in two columns [closed]

I have table with 17 Indexes if i add 1 more index for search in two columns insert , update and delete queries will be slow.I dont want them to slow...what to do
1
vote
1answer
593 views

What is the difference between Oracle clusterware and Real Application Clusters?

What is the difference between Oracle clusterware and Real Application Clusters? If we have 2 servers and want to join them into a cluster why there are two separate software products?

15 30 50 per page