Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Unanswered Questions

26
votes
5answers
2k views

SQL Deadlock on the same exclusively locked clustered Key (with NHibernate) on delete / insert

I have been working on this deadlock issue for quite a few days now and no matter what I do, it persists in one way or another. First, the general premise: We have Visits with VisitItems in a one to ...
14
votes
0answers
264 views

Is it safe to add a new node to a Cassandra cluster while a repair is running?

I'm getting ready to expand an existing Cassandra cluster. I have repairs scheduled to run on a reoccurring basis. Do I need to disable repairs when adding a new node to a cluster, or can I ...
14
votes
0answers
339 views

9i streams capture doesn't evaluate rules

I have a streams replication set up between two oracle 9.2.0.8 instances as sources and an 11g instance as a destination, processing a small subset of data from each database (let it be one table ...
12
votes
1answer
523 views

How can I prevent UNPIVOT from being transformed into UNION ALL?

I have a somewhat complex Oracle query which is taking about half an hour to complete. If I take the slow part of the query and run it separately it finishes in a few seconds. Here's is a screenshot ...
11
votes
1answer
652 views

SQL Server 2016 vs 2012 insert performance

I have two SQL Server instances on the same server: Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Standard Edition (64-bit) Microsoft SQL Server 2016 (SP1-CU5) (KB4040714) - 13.0.4451.0 (X64) ...
10
votes
0answers
95 views

Why is PostgreSQL choosing the more expensive join order?

PostgreSQL using defaults, plus default_statistics_target=1000 random_page_cost=1.5 Version PostgreSQL 10.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 6.4.0) 6.4.0, 64-bit I've vacuumed and ...
10
votes
1answer
6k views

Use LDAP for name look up with Oracle Instant Client

Partly as a result of having problems with conflicting versions or bitness with the full installation of Oracle client, my development team (of which I'm a member) has been moving towards using Oracle ...
9
votes
1answer
123 views

Optimizing a 'latest' query in Postgres on 20M rows

My table looks as follows: Column | Type | -----------------------+-------------------+ id | integer | source_id | integer ...
8
votes
1answer
162 views

Statistics on index on partitions not used in query on the whole table

The following join has very different row estimates when doing a join on the partitions vs when joining on the whole table: CREATE TABLE m_data.ga_session ( session_id BIGINT ...
7
votes
2answers
104 views

Foreign Key with a Constant

Let's say I have a table A, that has two columns: one is an ID for ThingA, and one is an ID for ThingB. The primary key is (ThingA, ThingB). Next, I have a second table, but this time it's restricted ...
7
votes
0answers
205 views

Why does RDS PostgreSQL always recover on restart?

I am running an RDS instance of PostgreSQL 9.6.3: select version(); returns PostgreSQL 9.6.3 on x86_64-pc-linux-gnu [...]. I have found that after issuing a stop from the RDS console followed by a ...
7
votes
1answer
864 views

Query External LDAP Server from SQL Server

I have done extensive research on querying LDAP Server but so far has not been able to work around. Therefore, asking experts help Background: I have a client whose LDAP Server is OnPremise (though ...
7
votes
1answer
217 views

min()/max() on multi-column timestamp index

I'm finding it difficult to understand why there's a bunch of heap fetches going on in this query. To my understanding, when there's no nulls (at either end) in the index, reverse searching the index ...
7
votes
1answer
494 views

SQL Server Updated Record on Read-Only Filegroup?

I have a very large database in our data warehouse where we have implemented partitioning to manage maintenance and backups. Records of a certain age are eventually migrated to a read-only file group ...
7
votes
1answer
441 views

Convert query in words to relational algebra

I have a follow-up question to a question I have previously asked on SO. Instead of the query from my initial question, I want to convert the following into relational algebra: List the names and ...

15 30 50 per page