I'm not English speaking, I understand the joke but say please what is "ass door" Is it the same as butt door? Didn't find it in the dictionary...
ck.imgur.com/pS3KW.jpg
i always forget and fail to find on googling >:/ ... anyone know offhand what the program is that you can give it a pg wal segment file and it spits out the plaintext log records?
Question about C# - ConnectionString Do you know any reason why I can open an SqlConnection only if I remove InitialCatalog parameter from ConnectionString? It's the first time I see this issue.
If you specify an Initial Catalog, you have to have access to it. If you expand before connection and put that in the Options...Connection Properties instead of <default> or master or what is there, what happens?
By now I'm forced to use SELECT [db].[schema].[object] syntax
What's unclear about it? A function returns a table. One of the columns of that table is calculated from a parameter of the function together with the data from a table existing in the database. The other columns of the returned table are unchanged from the table in the database. I want to be able to run update statements on the returned table. — beerockxs32 mins ago
I have seen some pretty weird stuff in connection strings before. Like in Oracle depending on the setup of tnsnames, we had to use different setting names on test and prod because one was set up differently in TNS. They aren't all as interchangeable as you think.
@CadeRoux my db instance is case sensitive (Latin1_General_BIN), it's a 3rd party software, I've added a new database where I'm adding some views and functions. I don't like to modify the production db.
I've tried this: a) Add a new SQL Server on VStudio SQL Object explorer (selecting a default db), b) Editing connection properties and copy and paste the connection string. But there isn't an InitialCatalog parameter
Initial Catalog is same as Database and all it does is override of user's default DB if it's provided in connection string. I had something weird with that recently, but I think it was just I was on the wrong instance and the database wasn't on that instance, because I have too many instances right now: ., .\SQL2012, .\SQL2014, .\SQL2016.
Question about reading execution plans. My cost percentages add up to be over 100% (by quite a bit actually). From what I can gather, the general consensus online is "the displayed cost percentage is a garbage number anyway, just start with the highest percentage and go from there". I'm not sure if that means I should tackle the insert marked with 62% first or if I should go after the three eager spools, each marked with 30%
I am referring to SQL Server query execution plans to take query cost and then optimize the required things by looking at the plan.
But the total of individual query costs adds up to more than 100%.
This is my query:
DECLARE @date SMALLDATETIME
SELECT Reffd AS NAME
,(
SELECT (
...
> The bright side is that fixing these issues are fun! How queries are optimized and executed against different sets of data is super interesting to dive into. - Brent Ozar
There's a few nvarchar(max)s in there but only a few (two that I count but there could be more hidden away in a view or sproc that I haven't stumbled into yet)
I'm not an expert on HP, and would prefer to ask Joe or Paul. Given that it's a self insert, and the spool doesn't seem to serve another purpose, I would guess yes.
@MikeTheLiar This is mostly uninformed opinion based on your screenshot, but if you have a test environment where you can try things out, you may want to give the approached outlined in this Q&A a shot: dba.stackexchange.com/questions/230722/…
Also, it looks like that sort is because you have an index on the temp table you're inserting stuff into. Do you need that index at that point in the process? You could eliminate it and the sort by dropping the index.
@JoshDarnell thanks, I'll read over these links. I do have a test env where I can successfully reproduce the issue and can also basically do whatever I want, thankfully. We do need the index (I think) - IIRC, the temp table exists to to cut down what we need to query from the aforementioned nasty view. Basically, create the table, add the indexes that we're going to need to query against for this sproc specifically, and populate it from the giant, nasty view.