« first day (1897 days earlier)      last day (3266 days later) » 

02:15
@AaronBertrand Not present in 2008 build 10.0.6547 (latest)
02:28
@PaulWhite thank you
 
2 hours later…
03:59
PSA: If you edit a question to make it better, consider up voting the result. If you answer a question, consider up voting the question that was good enough to answer.
7
 
1 hour later…
05:15
A rather scathing op-ed on MongoDB.
 
2 hours later…
06:58
@PaulWhite usually doing this
but there are questions that don't deserve an upvote, even after editing and answering
2
07:12
@dezso That's fair enough.
08:02
@ConcernedOfTunbridgeWells Some of it is probably accurate, but that guy seems to be resentful that Mongo killed a product he was building by introducing a Postgres connector (as I recall it).
The aggregation framework he mentions is fun to play with (kind of like having the sed/awk/grep/cut/uniq etc pipeline in the database) but it would be frustrating to have to rely on that in production instead of SQL aggregation and window functions.
08:18
@JamesLupolt Yeah, he is probably biased by that ;)
He has a point though. A connector that transforms the data from Mongo objects and kind of loads them into a Postgres db is not the same as a connector (or product) that does the aggregation inside Mongo.
It's like admitting that your (super scaling MongoDB) product can't do some things, and you have to rely on a SQL engine
@JamesLupolt I read this post as well (from December): linkedin.com/pulse/…
 
1 hour later…
09:51
@ypercubeᵀᴹ Notifying you that the answer has been edited. — Paul White ♦ 15 mins ago
@PaulWhite thnx, I hadn't downvoted.
@ypercubeᵀᴹ Ok, I figured you might like to know in any case.
 
1 hour later…
10:52
@PaulWhite related to the discussion we had yesterday about the tag:
I wouldn't be able to close this, if it hadn't that tag. Which might be proper, as the question is specifically about Postgres and not SQL in general. dba.stackexchange.com/questions/132257/cte-ordering-guarantees
@ypercubeᵀᴹ Well it depends. If we were to merge sql into sql-query, I'm pretty syre you'd keep your goldhammer. You'd still have a close vote and the ability to flag in any case, of course.
But yeah.
Yes. I mentioned it because I was a bit surprised that the q was closed immediately. Hadn't noticed the tag when voted.
@ypercubeᵀᴹ Indeed. Gold hammers often come with a surprise element. Equally when they don't work because the tag wasn't original. The other solution of course is to double your present score in the PG tag :)
11:10
I'm working on that ;)
11:30
Is this a valid option? seems good to me but I wonder:
1
A: Clear missing index DMVs

RunwinYou can only clear these one table at a time (Or by restarting the server). If you rebuild an index, add an index or drop an index that table gets removed from the view. So by extension if you create a 1-row filtered index on the primary key and then drop that index again you will remove that ta...

This q lasted 18 mins in SO: stackoverflow.com/questions/36007376/…
When it was closed, they reposted at DBA: dba.stackexchange.com/questions/132260/…
@ypercubeᵀᴹ Yep.
And yes, you can create a filtered index with no rows in it.
Otherwise, how would you remove a row that was the only row that qualified for that index? ;)
11:50
@PaulWhite No, I know you can. I was asking if it would be an improvement. (probably not much I guess) And if it would still clear the DMVs
@ypercubeᵀᴹ I'd say, "no" and "yes" respectively.
Of course it's a bit of a hack, but what can we do until they provide a proper mechanism.
@billinkc which OS?
 
1 hour later…
13:19
@dezso Linux I guess. testing the new SQL Server.
2
13:36
In the next cloud based AX we no longer get access to production, you need to instruct a MSFT support engineer for everything you want done
What could possibly go wrong....
13:46
Far out. Interesting times ahead then.
%s/interesting/frustrating/g most likely
14:06
@AndriyM Has this question improved?
@PaulWhite Considerably, in my view. Voted, thanks.
@AndriyM That's what I thought too, cheers.
14:42
@ypercubeᵀᴹ For the longest time, part of my new computer setup was installing cygwin so linux is not so foreign for me. Well, unix(r) isn't so foreign
@AndriyM Good answer. I'll try to remember to vote on it when I can.
@PaulWhite @AndriyM +1 from me
@PaulWhite Thanks. I'll try and restrain myself from reminding you.
@swasheck Thank you.
@AndriyM No feel free. If I don't comment, I often forget.
(I check my recent comments every day to see what has happened)
15:08
well ... what did you think was going to happen?
Crikey.
i love stuff like that
@swasheck He's lucky he can still share that video
@TomV he has one where he pours it on salt and the salt popped all over his arm and burned him
@swasheck I'd possibly think nothing before changing into proper pants instead of shorts
those 2500 Fahrenheits are not a joke
I mean in other videos he doesn't wear pants but shorts
15:14
@swasheck He better hope his insurance folks don't find out he did all that when he needs them because it went wrong then
@dezso yeah. must be a professional smelter
:O
15:30
Hi all
Do you know maybe if it's possible to change ODBC connection string so that appliation which does inserts only does inserts to the csv file?
I am trying to work it out in .net...
LOL
How did I missed that over past 3 days in google heheheh
yeah, I am going to test it on .net app
I cant recompile it but there's plenty of connection strings :D
Ooo! Repcap! Haven't done that for a while.
braggart
I can fix that
15:43
Made a few changes to the following question:
10
Q: Implementation of a many-to-many relationship with total participation constraints in SQL

JohnHow should I implement in SQL the scenario depicted in the following Entity-Relationship diagram? As it is shown, every A entity type occurrence must be related to at least one B counterpart (indicated by the double connecting lines), and vice versa. I know I should create the three tables tha...

I consider it's a good one.
@PaulWhite just came across a query where a CONVERT_IMPLICIT(nvarchar(36),[table1].[k1],0)=[table2].[k2] sent a query into a horrid spiral
@MDCCL Yeah I saw. Nice diagram :)
@MDCCL The picture's too neat now.
@PaulWhite Thanks.
@AndriyM Hope the new title also helps to provide a bit more visibility. I deem the question and ypercube's answer can definitely help some seekers.
@MDCCL I'm sure they can. It was a good but not very well presented question. You've made quite a transformation.
16:02
@AndriyM Thanks. It deserved a few polishings.
@Phil used to live in Poland
@swasheck That explains a lot
Not sure how correct that is but they seem to have a reputation for being a bit grumpy (or so the stereotype goes)
@TomV i'm polish
and it fits.
16:25
@TomV I'm not Polish though
16:40
Are there solutions for abnormally low page life expectancy that isn't "throw ram at the problem"?
Change your data types to fit more data on the page
If virtual, fugetaboutit (at least that's what I hear)
Well shite.
Why is PLE low?
Do you have lots of single use plans in there?
@billinkc that's what I'm trying to figure out. This problem is only present in one testing environment
Do you have apps that pull the entirety of tables so they filter in memory
Is the test workload comparable to production workload?
16:47
Identical applications running in QA/UAT are fine. In Staging the ple plummets when certain read/write intensive operations are run.
Workload is basically identical.
Possible hardware/network/san issues?
@mikeTheLiar are you having performance problems, or are you alarmed at the number?
@swasheck timeouts, timeouts everywhere
(thank god someone stepped in before I asked more questions)
16:49
@mikeTheLiar PLE is a symptom, not the problem
did you trawl the system_health event?
I've looked through it but there's a ton of data in there and I'm hardly a db expert. This is all pretty low-level stuff for me, which ironically is over my head.
I'm just a code monkey. I dance for peanuts and bananas.
Dance code monkey, dance
Are the workloads identical? Similar? Kinda sorta the same?
They're roughly equivalent. The QA/UAT dbs are on the same SQL instance but Staging gets a server all to itself.
You can post the results of the system health stuff and we can help interpret
I feel like this has to be a server/SQL configuration issue but I can't find anything likely
To be clear we're talking about the gist you posted yesterday, right?
16:54
@mikeTheLiar same hardware? Same values for sys.configurations? Same exact workload with same exact workflows?
@mikeTheLiar yes
As far as actual physical hardware, I don't know. They're all vms.
Do you have any form of monitoring?
Solarwinds
@mikeTheLiar personally, I hate vms
Not my call. A combination of IT and customer contracts
Dance code monkey
16:56
@mikeTheLiar so is it giving you alarms or clues?
@swasheck yeah, it's telling me ple is low :)
@mikeTheLiar 90% of our environment is virtualized ... poorly
Solarwinds is suggesting adding an index to one of the tables but I don't think that's the problem - we're seeing timeouts with both reads and writes
@mikeTheLiar are you able to look at the historical ple for this server
@mikeTheLiar it could be but we'd need more information
I don't think we have historical ple
16:58
@swasheck Is the other 10% physicalised well?
@swasheck is there anything specific you'd like to see from system_health?
brb
17:18
@swasheck @mikeTheLiar SQL Server Event Log might be a better start than system_health. From SSMS > Object Explorer > Management > SQL Server Logs
@wBob I looked through them but didn't see any sort of smoking gun.
NZ just beat India at cricket. Going to sleep on the basis that today has peaked.
@JamesLupolt 10% of the 10% is
@mikeTheLiar all of it
One thing that I noticed (and I have no idea if this is relevant or not) is that the problematic environment has significantly more files and file groups than the others
@wBob i'm assuming he's not dumping deadlocks to errorlog
and that there haven't been any catastrophic oom dumps
17:22
@swasheck Oh maybe I missed earlier note, thought this was about timeouts.
NP
@mikeTheLiar well ... ok
Hmm. What would be the best way to get these results somewhere where you can see them @swasheck? Should I just dump them into a google doc or something?
@wBob it is. but errorlog had nothing of any value (at least according to the liar)
@swasheck got it.
@mikeTheLiar gist is probably best for me ... most online storage is blocked by my employer :)
17:24
lol. I'm not saying that, I'm just saying I didn't see anything that looked relevant.
@mikeTheLiar may as well post your errorlog too :)
i'm supposed to be analyzing the viability of compression in our DW ... but this seems more fun right now
@swasheck Yeah, re "relevenat" <-- we'll be the judge of that : )
I (and the rest of my team) appreciate the assistance. We don't have any actual DBAs on our team so when weird db stuff starts happening we're basically dead in the water.
I'm also thinking timeouts is not really a SQL Server thing. If you run query on Management Studio or sqlcmd etc it will run from now until the end of days. Timeouts is more of a client thing, eg default ADO connection timeout is 30 seconds.
If that hasn't changed, then could be the sign of an overly busy server (which would almost certainly be apparent in the SQL Server Event Log) or something network related, which probably wouldn't.
My gut says network but I don't have anything to back that up yet
17:29
Sure, a little early to speculate. Let's dig around a bit more. The Windows Event log on the box in question would be a good place to look too.
@wBob this is where i need a bit more clarification. are we timing out queries? are we timing out connections?
@swasheck Indeed, we need the specific error message. Good point.
The error message is being thrown by the client, let me look up that stack trace
Possibly related to files/file groups - event log says "Autogrow of file 'tempdev' in database 'tempdb' was cancelled by user or timed out after 30 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size."
@mikeTheLiar Looks relevant to me. Excuse my earlier typo "The Revenant" : )
Here's the C# stack trace FWIW: gist.github.com/anonymous/70696d89bd5c3d7208ac
(probably not helpful but can't hurt)
17:34
I think we need more information on tempdb please. How many files does it have, what size are they, what initial size, what is the filegrowth set to?
@wBob @mikeTheLiar where are they located, etc.
One sec, let me pull that up
screenprint from SSMS of tempdb properties, Files tab (all of it) would be good.
Roger wilco
@mikeTheLiar also, do you have RDC access to the box?
17:36
Yes
or dump from sys.database_files would be good too.
start->run->secpol.msc ... Local Policies -> User Rights Assignment -> right-click "Perform volume maintenance tasks" ... who's in the window?
Hmm, percentage files growth are not popular because they get worse over time, eg 10% of 4TB is ... you're gonna wait a long time. MB settings are, generally speaking, better.
Diagnostic info - the slow queries run in >1 sec in SSMS
17:40
select d.name, mf.name,mf.physical_name
from sys.master_files mf
join sys.databases d
	on d.database_id = mf.database_id
order by d.database_id
what's that give you ^^^^
@wBob yeah. fortunately that changes ... finally ... in 2016
sadtrombone
@swasheck administrators
@mikeTheLiar start->services.msc->right click "SQL Server ({{instancename}})"-> Log On panel ... is that account a local admin?
It's a "best practice" (again generally) to use MB growths rather than percentage, I'm just wondering if it's the root cause of all your problems here - probably not is what I'm thinking. Pre-sizing tempdb so it doesn't grow is good too.
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@wBob presize all the things
17:45
@swasheck Indeed.
It's a lot, yeah. I said there were significantly more
@mikeTheLiar great. so do you have your system_health stuff still in a temp table? can you pull the wait_info section?
I'd really like to post a comment of "gun, baseball bat, pliers and a blowtorch" for this question stackoverflow.com/questions/36018151/…
@swasheck no but it's running on the same account as the non-problematic environs
@billinkc i'd suggest informatica
17:49
@swasheck do you want me to just dump it in a gist or should I look for something specific? There's >3k results
@mikeTheLiar well ... i guess just dump it to a gist if it can handle it
@mikeTheLiar That's like saying the Pacific Ocean has some water in it.
The sun is above room temperature.
Donald Trump is a bit unpleasant.
@mikeTheLiar that's like saying @MikeFal makes questionable comparisons
17:57
I was hoping copy/paste to Excel would be smart enough to figure it out but I guess not.
@swasheck Your mom didn't think my comparisons were questionable.
Your grammar is impeccable.
XD
@mikeTheLiar eyeballing it ... i'd say tempdb es en fuego
no bueno
no bueno y no me gusta
1 - grammar fixed, 2 - I'm a DBA and musician, english is not my strongpoint
17:58
@MikeFal well ... if you're spending QT with my mom then i'd say it's not just your comparisons that are questionable. stacey's mom, my mom is not
I would probably check for tempdb filegrowths next, an easy way is with one of the built-in reports from SSMS
Object Explorer > Databases > System Databases > tempdb > Right-click > Reports > Standard Reports > Disk Usage
Run that and you should see two pie charts. If there has been any filegrowths, there will be a filegrowth section you can expand. How does that look?
@mikeTheLiar as an aside. i wasted many many many hours playing Morrowind/Tribunal/Bloodmoon when i should have been doing my graduate thesis
@swasheck Mike knows much, tells some. Mike knows many things others do not.
@wBob there are a bunch of data file auto growth events, all from today
Pie charts if anyone's interested
@mmarie ^^^^^^^
ok, well there is some evidence for you. tempdb is empty now but filled up and grew earlier.
How many CPUs has the box got by the way?
18:04
6
each growth takes x ms. Queries have to wait whilst this happens.
the solution is pre-size the database.
Hmm. I just double checked against the non-problematic environments and they have a similar looking report for tempdb
brb
i like this query, personally
select
	tc.name TraceEventClass ,
	te.name TraceEvent,
	tr.HostName,
	tr.ApplicationName,
	tr.LoginName,
	Duration,
	tr.StartTime,
	tr.EndTime,
	(tr.IntegerData*8.)/1024 GrowthMB,
	tr.ServerName,
	tr.DatabaseName,
	tr.FileName,
	left(path,patindex('%log_[0-9]%',path)-1)+'log.trc'
from sys.traces t
cross apply  sys.fn_trace_gettable(left(path,patindex('%log_[0-9]%',path)-1)+'log.trc',default) tr
left join sys.trace_events te
	on tr.EventClass = te.trace_event_id
left join sys.trace_categories tc
@swasheck anything in particular I'm looking for?
269 rows. 211 corresponding to tempdb, 57 corresponding to the application database, and 1 for master.
it's just a query to show growths and how long they're taking
18:11
Ah, gotcha
[Duration] will be particularly relevant
That's in milliseconds, right?
i think it's micro ... but let me check
nope
milliseconds
@mikeTheLiar soyeah. it's milliseconds
Well one in particular stands out - 21 minutes
@mikeTheLiar that's probably a log growth
18:19
It says Data File Auto Grow
oh crap. that's nuts
GrowthMB = 0.8125
pretty sure that is microseconds. The built-in report just does that for you. Worth double-checking against that.
@wBob the numbers are so huge that it has to be micro ... but msdn says milliseconds
so shrug
it'd be nice to know what's going on that's causing you to use tempdb ... but here are a few low-hanging fruit that i'm noticing:
1) your sql service account is not able to use instant file initialization (the "Perform Volume Activities" exercise that i had you do earlier). put the service account in that group in secpol.msc and bounce the sql server service (during an appropriate window)
2) all of your files appear to be in the same location (unless you have fantastically awkward mount points). change this. request new data stores as mounted volumes for user db logs, user db data files, an
3) check your index utilization and make sure you have the correct indexes to support your workload
isn't is something like, if you view the data in Profiler it is ms, but the raw data is micro ...? Anyway, cross-ref against the Disk Usage report which has the reported ms figures.
18:23
@wBob yeah ... i think i actually even answered a question on here about it ... that's embarrassing
@wBob yeah, that looks right. Disk usage is reporting duration 1283. Still the biggest number in the table
@swasheck you can't remember every which way thing. The product is so huge now.
@mikeTheLiar that's still a long time for 3/4 MB growth. i think you have a file layout problem. you could set up all kinds of awesome perfmon counters to get your disk response times
buuuuut that may be overkill for something as red-flaggish as this
Just looking through the wait info, there's a few locks, a few PREEMPTIVE_OS_GENERICOPS, which no-one knows what that is, someone is taking a long running backup, although this looks like an automated one, looks like there was a series of index rebuilds / index maintenance recently. I'm not seeing anything else particularly eye-catching, although there's a lot of stuff, may have missed something.
The index maintenance scripts were run last night. Figured it couldn't hurt, might help.
18:28
Does the VM get rebooted often or SQL Server service restart?
Not often but rebooting was one of the things we tried. Other than that once a month for scheduled updates (which actually happened today)
@wBob yeah. preemptive means it's gone outside of sqlos ... and OS_GENERICOPS is ... not helpful
So when you restart SQL Server, tempdb goes back to its initial size, and then will grow again when required. As you can see, this can take time.
i'm still concerned about the shared path to all data/log files ... especially with all of those staging files
(partitioned?)
Hmm. This problem predates the reboot however. When it first started showing up the server hadn't been rebooted in close to a month
18:31
I'm wondering if the long-running backup clashed with the index rebuilds too, or was that all "last night"?
That was all last night
IIRC Backup runs every night. Typically index rebuilds happen on the weekends as needed but we ran it manually last night
backups aren't generally blocking but can prevent log truncation (I think). This could lead to filegrowths, percentage filegrowths lead to pain, pain leads to the dark side.
This is all the domain of IT
Dance code monkey, dance
Fire your IT
yes. #4 ... change filegrowth to a reasonable amount and size your files to what they need to be
@billinkc these arent the support staff you're looking for
18:34
Here's how I would approach this: presize the main tempdb file to 1GB, alter the filegrowth to 128MB. Presize the tempdb log to 512MB, same filegrowth. This may not be the root cause of your problem, but tempdb's current size shows it needs to be at least that size for certain operations. Make sense?
Do a similar filegrowths investigation into your main database.
@wBob yep
Perf. tuning can be iterative, so if we had warnings about tempdb in our log this time, and we rule it out by presizing it, next time, if this problem occurs we know it's not tempdb autogrowths - we've ruled it out. We look elsewhere.
Okay, I definitely need some food right about now. Thanks for the help everybody, if anyone has any blinding flashes of insight I'm all ears :)
@wBob makes sense
@swasheck has also made some good points about instant file init etc, they need to be looked at, alongside potentially splitting tempdb into multiple files, but thats another conversation. Good luck!
@wBob i get all twitchy when i see all files in the same location. it's like that mole scene from austin powers
once i see it i just cant let it go
18:38
@swasheck lol indeed. Not uncommon on dev and test VMs though. Hopefully this isn't production right? I mean, it has not been configured ...
@swasheck : (
The dark side of the force is the pathway to many abilities some consider to be ...
unnatural.
@swasheck I'm off for a bit too, maybe we should start a managed service, SLA in moles per hour.
MOLE MOLE MOLE MOLE
i'm just glad we shut that @billinkc guy up before he made things worse
18:56
Can someone recommend a way/tool to compare two PostgreSQL databases (schema and data)?
I'm writing migration scripts right now and I'm feeling like I should have a different tool to help me :P
 
2 hours later…
20:42
@Phil You're a quick learner, you picked it up real fast :)
21:33
@TomV Polish is impossible ;-(
@Phil I meant the grumpyness :)
22:21
I've have just received a bug report. And I quote "Weird stuff in the workflow thingy." 8-|
@MichaelGreen Client called me last week and said Excel cube function report isn't working because the numbers won't change anymore. We open it up, and user has typed over all the formulas to hard code numbers into a row at some point.
 
1 hour later…
23:45
Are any of you brilliant folks on because I've run into a problem that I simply do not understand.

« first day (1897 days earlier)      last day (3266 days later) »