@EvanCarroll As would flagging things you find problematic instead of responding to them.
@EvanCarroll Also FYI please use your free downvotes on questions where appropriate. It is more useful to the system in the long run than a close vote on its own. Ta.
@JoeObbish It was morning (aka '), yes. Around 4am as I recall.
@ypercubeᵀᴹ Yes, my reply was linked back to a hopefully relevant Heap message. Anyway, it was this question and the work you did with comments and chat especially.
When I've posted Greenplum questions in the past, I've been advised to tag them as Postgresql unless they are specifically related to the distributed nature of Greenplum. In the case of my most recent question, it turns out the answer is identical for both so both tags were appropriate. — PhilHibbs1 hour ago
@Philᵀᴹ I've got SQLite working, though it's a bit rough and ready: dbfiddle.uk/?rdbms=sqlite_3.8 — it's currently creating databases in-memory but I could easily change to temporary files if that would be better.
@JackDouglas while in certain cases it might make sense to use both (especially in hindsight, when the solution turns to be one based on Postgres 8.2), I would not encourage it, to say the least
I am having a weird issue with LOAD DATA LOCAL INFILE, where it accepts the first column of data from my csv file, but puts NULL in all the other columns
http://pastebin.com/jQZ03D1N = data `LOAD DATA LOCAL INFILE '/home/dwilkins/xaa.csv' INTO TABLE po_2016;` = statement I can give the table structure, but what is weird is this worked fine with another table...The only difference is I created the other table with a raw import using phpmyadmin, but I created this one with `CREATE TABLE po_2016 AS SELECT * FROM first_table WHERE 0`
There are a handful of conditions where we will stop accepting suggested edits:
A large number of suggested edits by you were rejected in the past week (at least 5 more than one-third of your accepted edits).
We are out of empty slots in the queue (40, with several exceptions. See here for deta...
SQL Server Management Studio Startup
When Microsoft's SQL Server Management Studio (SSMS) starts it tries to connect the Certificate Revocation List (CRL) of Microsoft:
http://crl.microsoft.com/pki/crl/products/MicrosoftRootAuthority.crl
The underlying .NET components of SSMS are trying to con...
@hot2use It was very timely. I was just looking at that Q & A an hour or so ago and despairing at the enormous number of very average answers.
@ypercubeᵀᴹ I assume most were present before it came from SO, or were attracted by the bounty. Still, it's another of those old questions that don't necessarily reflect the best of dba.se
@hot2use Yes I recognised your answer was the right one even though I had personally forgotten the root cause, having never experienced it myself, only heard of it second hand.
@McNets I didn't mean you to delete that answer. You had a warning (about RI) which was fine. I commented so you can add another option to solve the issue.
Can somebody point me to a case where RG helps? A friend of mine visited a "SQL Server Performance Tuning and Optimizing" course and I think my friend recalled hearing that RG can be the root cause of performance issues and frankly should not be used. It breaks more than it fixes.
@hot2use Let's say that you have a workload that sends thousands of queries to be run against the database as part of the batch. I believe by default SQL Server will give a query up to 25% of a server's memory in a grant. Once a query has a memory grant it will not let any of that memory go.
If a query cannot get its minimum memory grant it will wait for up to 24 hours.
So in theory you can have a few poorly written queries block lots of other queries from running
So, bring in RG with MAX_MEMORY_PERCENT set. Now you can limit the damage that those poorly written queries do
What I'm whining about here is that MAX_MEMORY_PERCENT must be an INTEGER... with servers having 256 GB of RAM and even more these days that seems like a silly oversight
What is the Not an Answer Flag?
The Not an Answer flag is a moderator flag that community users can use to notify moderators that a posted answer is not an answer, and should be deleted.
What is the purpose of the Not an Answer flag?
To identify attempts by community members to use answers for...
I guess that downvoting on its own seems like an insufficient action. We don't want answers on the site that could trick someone into dropping a database?
@AndriyM I replied "what answer" since I had just deleted the answer @McNets was asking about. The humour is in answering his question with an answer which is an answer, but possibly not the one he was expecting.
@PaulWhite - this answer has a comment at the very bottom about something you wrote that has subsequently been deleted. I was going to edit the answer, but I have no idea what to do with it.
This also has the added benefit that the lengthy explanation offers an opportunity to overdo it a bit, making the explanation by itself appear somewhat funny.
Sometimes (probably mostly) LEN(x + N'.') - 1 can do just as well. What I like about LEN is that it's consistent regardless of whether I use varchar or nvarchar, whereas with DATALENGTH I need to remember to divide by 2 when dealing with nvarchar since I want the length in characters, not bytes.
Suppose we have the following queries:
1.
SELECT COUNT(*) FROM some_big_table WHERE some_col = 'some_val'
2.
SELECT COUNT(*) FROM ( SELECT * FROM some_big_table WHERE some_col = 'some_val' )
Does any of the previous queries performs better? Or is it the same?
Thanks in advance for...
I clicked it from your link, it's all the same. At least from the ORMs I've used. Though I haven't used Entity, I assume it doesn't play with window functions.
The order of execution is standardized. I assume MS doesn't deviate from it.
@EvanCarroll I agree that it's pretty much going to be the same answer; just the link you provide goes to the PostgreSQL docs, which won't help the OP, or future visitors to the question.
It's extremely rare that you will mindlessly join some in-memory data structure against two disparate data sources using LINQ or whatever and get anything approximating acceptable performance. You will always have to think about it.
@CadeRoux true but that is just a process. Software will very soon be able to understand how to do most things we currently do on a day-to-day basis, and they'll do them faster and more accurately than we do.
And by the time you think about it, you can implement a much better solution. While it's great that you can say something in LINQ that is pretty data access agnostic, if you are operating across data access platforms, it's going to require thinking.
@MaxVernon yes, but most of programming is not coding anyway, it's understanding the problem.
I'm only bringing it up to shed my anti-MS reputation. LINQ is real cool, I'm sure it's far from perfect. I just learned it to help some friends get jobs.
Fundamentally, that's the problem. Whenever a problem is abstracted, you are going to lose performance, hide implementation details that turn out to be crucial, increase debugging time, etc. It's just intrinsic to the process. RDBMS themselves are an abstraction. They benefit from the abstract model being somewhat close to the implementation model. Just like C.
SQL itself has already got a great deal of abstraction, being merely a declarative language. In that sense, there's little point abstracting it further by building ORMs on top of it.
Er.. what? Fixing a broken link would surely push you over the 6 character minimum in most cases.
Beyond that, dream bigger.
Is the post otherwise so perfect that nothing in it can be improved?
If so, then it is a rare post indeed ... like a majestic, dew-flecked unicorn.