Skip to main content
78 votes
Accepted

SQL Server Error 8632 due to over 100,000 entries in WHERE clause

To search for more than 100,000 values, put them in a temp table instead, one row per value that you're searching for. Then, join your query to that temp table for filtering. Something with more than ...
Brent Ozar's user avatar
50 votes
Accepted

Query for all the Postgres configuration parameters‘ current values?

SHOW ALL The SHOW ALL command displays the current setting of run-time parameters in 3 columns. SHOW ALL ; pg_settings The pg_settings view shows the same items as SHOW ALL but with additional ...
Basil Bourque's user avatar
35 votes

Which collation should I use for biblical Hebrew?

First: There is no distinction, collation-wise, between biblical Hebrew and modern Hebrew. We are just dealing with Hebrew. Second: Regardless of anything else, you want to use the newest set of ...
Solomon Rutzky's user avatar
29 votes

save/export PGAdmin server list configuration settings

Under Windows, pgAdmin4 stores the server list in the users directory in a SQLLite 3 format. Here: %UserProfile%\AppData\Roaming\pgAdmin\pgadmin4.db
Alex K.'s user avatar
  • 391
24 votes
Accepted

How do you turn off the croak sound for Toad?

Issue: You are experiencing a noise / croak sound when TOAD starts up. Solution: http://www.odipundits.com/2017/01/how-to-get-rid-of-croak-sound-at-toad.html View in the top toolbar -> Toad Options ...
Shaulinator's user avatar
  • 3,152
21 votes
Accepted

Why is SQL Server setup recommending MAXDOP 8 here?

Setup is recommending MAXDOP 8 Setup calculates the MAXDop as follows: Step 1: Calculate Hardware NUMA and Soft NUMA Step 2: Decide whether Hardware or Soft NUMA will be used Step 3: Divide the total ...
Sean Gallardy's user avatar
18 votes
Accepted

Understanding "max_wal_size" and "min_wal_size" parameters default values from postgresql.conf file

These are 16 MB WAL segments by default. The manual: The system physically divides this sequence into WAL segment files, which are normally 16MB apiece (although the segment size can be altered ...
Erwin Brandstetter's user avatar
16 votes
Accepted

Use Dark Theme on SSMS Results Grid, Object Explorer and other windows

These options are ignored as of SQL Server 2005 SP2 and still not fixed. See the relevant connect item: SP2: Results Grid Background color property ignored by Management Studio. archive link The ...
Tom V's user avatar
  • 15.7k
16 votes

Limit max CPU usage SQL SERVER with WSRM

Is there any reason NOT to use the approach you've defined? Absolutely. Imagine you had bought a car - a car that when you hit 50MPH the engine starts to overheat. Would your reaction to this ...
George.Palacios's user avatar
15 votes
Accepted

How can I disable parallel queries in PostgreSQL?

From the docs, max_parallel_workers_per_gather (integer) Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. Parallel workers are taken from the pool of ...
Evan Carroll's user avatar
  • 63.7k
15 votes
Accepted

How to set statement timeout per user?

Yes, Postgres allows settings per user or even per database and user, including statement_timeout: ALTER ROLE foo SET statement_timeout = 12345; -- milliseconds Related: How does the search_path ...
Erwin Brandstetter's user avatar
14 votes
Accepted

How to check the syntax of pg_hba.conf and other postgresql conf files on ubuntu/debian/linux?

You can run: postgres=# SELECT pg_reload_conf(); pg_reload_conf ---------------- t (1 row) postgres=# .. from within psql. or kill -HUP the postmaster process. Any config validation errors will ...
Philᵀᴹ's user avatar
  • 31.8k
13 votes
Accepted

How to define custom path to MySQL socket file?

Your error message says it's connecting to the wrong socket: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) You can either specify that in ...
Károly Nagy's user avatar
  • 3,030
13 votes

SQL Server Error 8632 due to over 100,000 entries in WHERE clause

If you're going to change the app anyway, consider either (a) using a TVP for the entire set of values - you would create a DataTable in C# and pass it into a stored procedure using StructuredType, ...
Aaron Bertrand's user avatar
13 votes
Accepted

MAXDOP Settings for SQL Server 2014

Bogus Here's why that wait stats report stinks: It doesn't tell you how long the server has been up. I can see it in your screenshot of CPU time: 55 days! Alright, so let's do some math. Math ...
Erik Darling's user avatar
  • 41.9k
12 votes

Can you see other users' session variables in MySQL?

As of MySQL 5.7 the performance_schema can provide this information. Is there a way to see the SESSION variables of other active, connected users, from a superuser connection ? You can get these ...
Courtney Miles's user avatar
12 votes
Accepted

Will Changing the Max Memory Setting Invalidate Query Plans?

Per Microsoft documentation changing the max server memory will clear the plan cache, as will changing: access check cache bucket count access check cache quota clr enabled cost threshold for ...
Nic's user avatar
  • 4,023
12 votes

Limit max CPU usage SQL SERVER with WSRM

Erik Darling mentioned the biggest practical reason for not using WSRM in a comment on your question: ...there's no reciprocal limiting of CPU use in other processes. SQL Server may not use those ...
Josh Darnell's user avatar
  • 29.4k
11 votes

SQL Server 2012 is putting [brackets] around Table and Column Names

If you are running SSMS 2017 at least v17.6, there is now an option to turn this off. In the options dialog, go to "SQL Server Object Explorer" and then to "Commands". Under the "Drag/Drop" heading ...
K Mullen's user avatar
  • 111
11 votes
Accepted

Postgres seems to ignore listen_addresses setting

Look at the postgresql.auto.conf file in your $PGDATA. If someone uses the ALTER SYSTEM command to change the settings, you will find the value there. postgresql.auto.conf is read after postgresql....
Arkhena's user avatar
  • 1,570
11 votes
Accepted

How to set lowercase_table_name

The server variable lower_case_table_names is described in the relevant documentation page: Identifier Case Sensitivity, where it also mentions: lower_case_table_names can only be configured when ...
ypercubeᵀᴹ's user avatar
10 votes

Create index on a Postgres table as fast as possible

If it's an option, you could pre-sort the data externally, before database import. In my test using PostgreSQL 9.6.1, a table with three double precision columns and 10M records with random values, ...
hruske's user avatar
  • 620
10 votes

How to get user-specific settings in PostgreSQL?

Unfortunately pg_shadow does not show roles with no LOGIN privilege. I find it more useful to use @dezso hint view in the following query: SELECT coalesce(role.rolname, 'database wide') as role, ...
Zorg's user avatar
  • 301
10 votes
Accepted

how to ignore the SSMS (sql server management studio) sql server ansi settings?

If you are asking whether it is possible to enforce the database defaults for every connection that ever happens on the server, then no. Those defaults only take effect if something contradictory isn'...
David Spillett's user avatar
10 votes

How to enable force ssl on AWS Aurora Postgres?

For Aurora Postgres, there's two relevant cluster-level parameters (note they're not instance-level parameters): rds.force_ssl and ssl. I haven't tested this myself but you should be able to modify ...
Simon Righarts's user avatar
10 votes

MAXDOP Settings for SQL Server 2014

Wait stats are just numbers. If your server is doing anything at all then you'll likely to have some kind of waits appear. Also, by definition there must be one wait which will have the highest ...
Joe Obbish's user avatar
  • 32.5k
10 votes
Accepted

What are the ramifications of setting ARITHABORT ON for all connections in SQL Server?

There are some defaults that exist merely because nobody really knows what the effect of changing them would be. For example, the default instance-level collation when installing on a system that uses ...
Solomon Rutzky's user avatar
9 votes

What is the search_path for a given database and user?

select * from pg_user; True for postgres and Redshift. This seems too simple compared to the previous answers that depend on pg_db_role_setting, but the useconfig column will have a list of user ...
Merlin's user avatar
  • 199
9 votes
Accepted

bug in database_scoped_configurations

Is this a bug with SQL Server 2016? Yes. Definitely this is not correct behaviour. I have reported it here and is fixed in SQL Server 2016 SP2 CU9. As Mikael Eriksson says in the comments sys....
Martin Smith's user avatar
  • 85.2k

Only top scored, non community-wiki answers of a minimum length are eligible