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

Unanswered Questions

27
votes
5answers
3k 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 ...
15
votes
0answers
352 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 ...
13
votes
1answer
623 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
0answers
176 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 ...
11
votes
1answer
752 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
1answer
169 views

SQL Server 2017 with 500 databases - Frequent AG disconnects since CU9

Hi everyone and thanks in advance for your help. We are experiencing challenges with SQL Server 2017 Availability Groups. Background Company is a retail B2B back-end software. About 500 single ...
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
153 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
196 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 ...
8
votes
3answers
874 views

High tempdb disk I/O during merge replication of BLOBs

Having a merge publication for replicating BLOBs (type image), got very high tempdb disk I/O for my size of data. Publication is download-only and has no filters. High disk I/O is caused by ...
7
votes
2answers
162 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
270 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
1k 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
236 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
537 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 ...

15 30 50 per page