Most Popular

1500 questions
21
votes
13 answers

The Value of Certifications

Questions What certifications do you have? Has your certification (or lack of one) ever worked for or against you? Do you intend to reach out for certification? Do you renew your certifications? If so, does your employer actively support the…
Riedsio
  • 1,377
  • 1
  • 14
  • 18
21
votes
8 answers

MySQL Workbench: "ssl is required but the server doesn't support it"

I'm having trouble finding answers with various Internet and Google searches for MySQL Workbench issue I'm experiencing. I have not found any answers on how to make this work again. Here's the MySQL Workbench error I'm having issues troubleshooting…
morgansbyers
  • 383
  • 1
  • 3
  • 6
21
votes
6 answers

SQL Server injection - how much damage in 26 chars?

I'm testing for resilience against injection attacks on an SQL Server database. All table names in the db are lower case, and the collation is case-sensitive, Latin1_General_CS_AS. The string I can send in is forced to uppercase, and can be a…
Alan B
  • 407
  • 3
  • 10
21
votes
3 answers

MongoDB: RAM requirements

Is it enough to have the entire index in memory/ram or does mongodb even try to allocate as much ram as possible to store even the data for fast reads? I'd like to run mongodb + other applications and it looks like mongodb is the only one which does…
ledy
  • 695
  • 3
  • 12
  • 16
21
votes
4 answers

Why is BULK INSERT Considered Dangerous?

I would like to understand why cyber-security teams in general (more than one organization I've dealt with) is dead set against granting BULK INSERT (e.g. TSQL) rights to applications and database programmers? I can't believe the "filling up the…
JackLThornton
  • 313
  • 1
  • 2
  • 5
21
votes
1 answer

Why is "select *" faster than "select top 500 *" in SQL Server?

I have a view, complicated_view -- there are a few joins and where clauses. Now, select * from complicated_view (9000 records) is faster, much faster, than select top 500 * from complicated_view We're talking 19 seconds vs. 5+ minutes. The first…
user45867
  • 1,683
  • 5
  • 22
  • 38
21
votes
1 answer

Why does SQL Server "Compute Scalar" when I SELECT a persisted computed column?

The three SELECT statements in this code USE [tempdb]; GO SET NOCOUNT ON; CREATE TABLE dbo.persist_test ( id INT NOT NULL , id5 AS (id * 5) , id5p AS (id * 5) PERSISTED ); INSERT INTO dbo.persist_test…
Nick Chammas
  • 14,670
  • 17
  • 75
  • 121
21
votes
4 answers

Advice on diagnosing a "sometimes" slow query

I have a stored procedure which returns results from an indexed view via a covering index. Usually, it runs fast (~10ms), sometimes it can run up to 8 seconds. Here's an example random execution (note: this isn't a slow one, but the query text is…
RPM1984
  • 435
  • 3
  • 10
21
votes
1 answer

Hash keys probe and residual

Say, we have a query like this: select a.*,b.* from a join b on a.col1=b.col1 and len(a.col1)=10 Assuming the above query uses a Hash Join and has a residual, the probe key will be col1 and the residual will be len(a.col1)=10. But while going…
TheGameiswar
  • 2,989
  • 4
  • 29
  • 50
21
votes
2 answers

Postgres suggests "Truncate table ... at the same time"

When running: TRUNCATE TABLE YYYYY RESTART IDENTITY I am seeing this error message: ERROR: cannot truncate a table referenced in a foreign key constraint DETAIL: Table "XXXXX" references "YYYYY". HINT: Truncate table "XXXXX" at the same time, or…
davetapley
  • 893
  • 4
  • 8
  • 15
21
votes
3 answers

How can I use a full-text search on a jsonb column with Postgres?

So i have a jsonb column that has entries like this: https://pastebin.com/LxJ8rKk4 Is there any way to implement a full-text search on the entire jsonb column?
choco
  • 211
  • 1
  • 2
  • 4
21
votes
3 answers

Why doesn't InnoDB store the row count?

Everyone knows that, in tables that use InnoDB as engine, queries like SELECT COUNT(*) FROM mytable are very inexact and very slow, especially when the table gets bigger and there are constant row insertions/deletions while that query executes. As I…
Radu Murzea
  • 408
  • 3
  • 11
21
votes
3 answers

Why can it take up to 30 seconds to create a simple CCI rowgroup?

I was working on a demo involving CCIs when I noticed that some of my inserts were taking longer than expected. Table definitions to reproduce: DROP TABLE IF EXISTS dbo.STG_1048576; CREATE TABLE dbo.STG_1048576 (ID BIGINT NOT NULL); INSERT INTO…
Joe Obbish
  • 32,165
  • 4
  • 71
  • 151
21
votes
2 answers

The certificate chain was issued by an authority that is not trusted

some time ago I installed SQL server 2016 developer edition on a windows 10 home edition environment (a laptop to be precise) and everything was fine. then someone - an administrator on the box - decided without telling me, to rename said box. after…
Marcello Miorelli
  • 16,170
  • 52
  • 163
  • 300
21
votes
2 answers

Returning a result set with multiple rows based on max date

I have a child table that is something like this: [Cust Date Table] | Customer ID | Some Date | Balance | +-------------+------------+---------+ | 1 | 2012-04-30 | 20.00 | | 1 | 2012-03-31 | 50.00 | | 2 |…
Joe DBA
  • 313
  • 1
  • 2
  • 6