« first day (811 days earlier)      last day (4354 days later) » 

00:34
Heh, I ran into two old PostgreSQL questions on SO that are beyond my capacity to answer and are good questions if a bit localized.
One is a pl/tcl question and the other is how to return free-form data from PL/R into a PL/Perl function that is callingit.
 
1 hour later…
01:47
Marian, if you want log performance then RAID1 is what you pick. RAID1 is faster for writing than RAID1+0. — Greenstone Walker 9 mins ago
Awesome
@MarkStorey-Smith That's assuming bulk sequential writes though, isn't it?
@ChrisTravers It's drivel, whatever you're writing
For lots of little writes, RAID 1+0 would definitely be faster
@MarkStorey-Smith Yeah, that does seem right on any sane implementation.
(if Raid 1+0 is slower, it would suggest poor design of the RAID implementation)
OLTP is so RAID 01
The mofo/b'stard/ugly/sob query that's wasted my past 48 hours has finally resulted in "query executed successfully"
Celebration time
01:53
In a previous job we'd do hardware sizing and tell them what to buy. Everything contractual, because we benchmarked and knew exactly what they needed given volumes
Client was told RAID 01, did RAID5. Hilarity ensued
Got flown out to fix the slowness after go-live, all slow IO
If you're going to spend 10 million on software, consultancy and support, at least listen to what's said!
@Phil Pub still got plenty of food and beer in stock?
and any indication when you'll have a useable road to escape on?
Well, the pavements are terrible in the village. Walked home on the road. Closed my pub at 8:30 because it was dead. 4 out of the 6 pubs were closed as I walked to the lock-in pub.
A friend that lives near Sheffield showed me pictures of the hilarity that was his drive into work today
Drive down a country road - end up reversing a mile because there's a 8 foot wall of snow
Impressive :)
Last night there were 4 cars of people that came down Winnats Pass, which is basically a hard drive in the middle of summer. All ended up getting rooms in the pubs because they abandoned their cars. Why they tried to go down one of the steepest inclines is beyond me.
One of my best mates is a farmer and I really feel for him because he's having to help these idiots to get their cars out of the way so he can get to his livestock! They've started lambing a few weeks early
Lambs born outside are as good as dead. Need to be chucked in a barn L(
(In these temperatures)
I'd never have known this crap if i didn't live in a village. it's cool :)
02:11
There was a story on the bbc about some chap that abandoned his car and died on the trek out :/
To be honest, it's satnav. If any sane person looked on a map they would realise instantly that they'd be better off taking a big detour. Or just not travelling in this weather
@jcolebrand @jnk @JackDouglas Did one of you chaps decline the my flag on this ...
-1
A: SQL Server 2008 - Cross database performance on same physical machine and server instance

MaiakaatI'm also having this problem, the other database(s) is/are unable to store anything in cache, meaning each request takes the full length of time, running the query on the other databases builds the initial response three times faster and caches results (and related results for similar queries) fo...

I did.
Flagged it from the review queue when I don't believe your comment was there
It wasn't
Hence I left the comment and declined the flag
Downvote, leave a guiding comment, move on
02:23
Right. So the review queue highlights it, I flag it as not an answer, you comment that its not an answer but that isn't a valid flag?
I don't think it was a question, but I want him to know that someone has seen it, they don't like it, and something is wrong here.
@MarkStorey-Smith I actually expect I replied to the flag with "this doesn't need moderator intervention"
@jcolebrand "flags should only be used to make moderators aware of content that requires their intervention"
It requires intervention, deleting
Yes. Guiding comments and downvotes do not require that
Let it sit for a bit so the poster can see the response to their post
Mods don't like to delete non-spam in the first 12 hours life of the post
IF you feel that strongly about it, tell me when it's been around for 10 days, so that the poster (if they came back) would've seen the comment replies.
After 10 days I'll delete it, but not in the first 12 hours
So the review queue puts it in front of us to flag but mods won't touch it. By the time you would touch it, its no longer in the review queue. What a waste of everyones time.
@MarkStorey-Smith wrong
You're ignoring that I touched it twice
Once to downvote it
Once to leave a guidepost comment
Had you done so it wouldn't have needed a flag
@JackDouglas do you concur?
02:28
You haven't downvoted it, I did.
/facepalm, I thought I had ... lemme do so
If I leave a comment, I have to remember to come back later flag it when inevitably the post hasn't changed. I standby by my original point, waste of time.
I'll stick to the spam. The broken windows can accumulate all on their own.
02:47
@MarkStorey-Smith I had one of those a couple of days ago. Shrugged and carried on as before.
@PaulWhite I've had several, so wanted to find out the reasoning. I'm none the wiser :)
@MarkStorey-Smith Seems to me moderator action did take place based on your flag, so must be some new sense of 'declined' we are encountering here. Helpful but declined, perhaps. LOL.
03:17
Paul what's your rate for consultancy in NZ?
03:34
@PaulWhite I get helpful but declined on some of my SO flags
Of course I am working on cleaning up old questions and a significant number of them I think need to be removed (some I can edit, some I can answer, a few are good questions I can't answer)
Speaking of old ones I am answering, this one may have significant re-use value:
0
A: Is it possible to have PostgreSQL function return “arbitrary” type?

Chris TraversYou have two options. The first is to use a polymorphic type which would be cast on call, the second would be to use a refcursor. Polymorphic type In this case, you'd do something like: CREATE FUNCTION foo (bar varchar, baz ANYELEMENT) returns ANYELEMENT AS $$ SELECT 'test'::TEXT; $$ la...

 
3 hours later…
06:46
@MarkStorey-Smith for a while we had a sticky here from Uncle Sam jcolebrand that newcomers should be treated a bit more softly (like instead of flagging leaving comments and so)
07:19
@dezso I actually generally try to leave comments before I flag to give an opportunity to correct oversights.
He may be new, but I can;t tell if he just forgot to type a few very important words :-P
07:41
@jcolebrand I find both question and answer hard to parse but I think if I'm being honest I would have commented and deleted that one: the OP can still see the answer and comment when it is deleted I think? If it was a lot shorter I might have converted to a comment as it does genuinely seem tangential and not an answer.
Have you asked @JNK what he thinks?
 
1 hour later…
 
3 hours later…
JNK
JNK
12:07
@JackDouglas @jcolebrand I think I would also have commented and deleted
Broken windows!
13:00
@jcolebrand otoh I completely agree with that approach for bad answers that might be improved with a bit of user education.
JNK
JNK
@JackDouglas I do too, just not for NAA posts since they are essentially irredeemable
@JNK This is more like dirt under the carpet than a broken window because there are good answers on the same question and the DVs clearly mark it out as 'what not to do'. If it was just a poor answer rather than not an answer at all, I think that would sufficient (and it leaves the door open for improvement).
JNK
JNK
@JackDouglas Well I still consider a broken window since other users could see it and think it's OK
14
A: Sometimes, an answer is just plain wrong. What to do?

Jack DouglasThe obvious solution is to let answers that are "plain wrong" be downvoted into oblivion - where they will serve a useful purpose advertising their wrongness :) The problem is that there are two kinds of votes: informed votes from people who could have answered the question themselves or who h...

I'd think quite differently if there weren't contrasting good answers or a bad answer wasn't downvoted
Couple of comments - (a) a low rep user can't see their own deleted posts, and may not be active when any comment comes through (b) the problem with the bad answers is that they'll often get a couple of up-votes before anyone points out they're wrong. So unless subsequent down-votes more than compensate, there are two effects...
(1) the user earns net positive rep (even a +2 -9 is net positive) and so isn't discouraged from posting more bad crap in the future, because it works!
(2) if the user gets +3 -2 it still looks like a "good" answer (e.g. at least one person thought so). And low rep users can't click on the score to see whether that's really +1 or some combination of +-.
And finally, I used to be all for leaving comments to accompany my down-vote. Now I still leave comments here and there, but I'm very careful to not down-vote at the same time, due to certain assholes that will always exist.
JNK
JNK
13:12
@AaronBertrand I think they can see their own deleted posts in the context of the question
just not in their profile
and they will still get a comment notification I think
@JNK I'm not sure they can see their own deleted posts in any context. Do you have any evidence of this? Also they may still see a comment in the little drop-down, but unless the comment is very brief, they won't see that in their profile either, and still won't be able to read the entire comment. I'm also not sure how long it will stay in the little global notifier thingy.
I guess if they self-deleted they would need to have some way to edit and undelete. I'd have to create a sock puppet account to test.
JNK
JNK
@AaronBertrand I'm about 99% sure you can see your own deleted posts
and I think it stays in your inbox
ok
Other points still stand. When a bad answer gets upvoted, even once, nothing good will ever come of it. The best case is a dog-pile where enough people down-vote to make the guy delete the answer. Sadly with the current reputation scheme that ratio needs to be 5:1.
I will delete that post in a moment. :-)
13:30
@AaronBertrand that is true enough in the cases where rep is all that the poster cares about. Take a look at this answer though: I'm glad it is still there despite being wrong. The votes and comments tell a useful story.
@JackDouglas the answer could easily be re-worded to point out the problem in BOL instead of trying to state a fact based on an error.
@JackDouglas but let's be honest - a large portion of the lower-rep users on SO care only about rep.
@AaronBertrand sure, but my point is that it doesn't need to be. It serves a useful purpose just as it is.
@AaronBertrand on SO? I don't care ;)
I think we are a bit luckier than SO
Well to be honest there just isn't enough volume of evidence on dba.SE to really pick out trends and behaviors. I posted a really bad answer the other day and got 4 up-votes before I was corrected. I promptly deleted it because they were right.
So when dba.SE gets to the volume of SO, I fully expect similar trends to emerge (perhaps - and hopefully - at a lower rate).
Afternoon all
JNK
JNK
@AaronBertrand I think you in particular will get a lot of upvotes even when wrong
2
13:34
Everyone likes the beaker avatar?
@MarkStorey-Smith Hi :)
JNK
JNK
there are a few folks that will get upvoted just for posting. Part of that is if someone disagrees or thinks you are wrong they will be inclined to believe your post regardless
@AaronBertrand no but if you or Paul White or Martin Smith post something that I disagree with or think may be wrong, my first instinct is normally to say "Oh, I didn't know that!"
3
@JNK and that is because they usually are right
JNK
JNK
@JackDouglas yeah exactly
@MarkStorey-Smith hi Mark :)
13:36
I was quite embarrassed actually. I have had this misconception about COPY_ONLY databases my entire career - namely that they couldn't be used to restore to a point in time with subsequent logs.
@Mark I've deleted that post btw
@JackDouglas I've got more for you :)
JNK
JNK
@AaronBertrand That's obscure enough that I wouldn't think to question it either, honestly
@JackDouglas I came close but didn't want to stir the pot
And I had never bothered testing it because I just didn't believe the scenario was even possible.
13:39
@JNK I'm pretty sure @jcolebrand won't mind: he is a pretty humble guy even though he argues forcefully (which I'd say is a quality too :)
@MarkStorey-Smith bad answers or 'not an answer' answers?
@JackDouglas I'll dig through my rejected flag list
@MarkStorey-Smith I can hear the barely-concealed pain in your voice ;)
You don't like rejection?
@JackDouglas Not at all. More that I flagged them because I thought they should be deleted, and they haven't been.
This one was flagged, flag rejected, subsequently deleted (so no problem there)...
@MarkStorey-Smith I think that one is better as a comment on Rolando's answer
 
2 hours later…
15:26
Please VtC. This question is asked over and over and over again. It needs to die.
0
Q: How can I append varchar's in a group by clause in SQL Server?

ZeeLet's say I have a table called EmployeeSales EmployeeId | Profit 1 | 10 2 | 15 2 | 5 3 | 20 I could write a query such as select EmployeeId, SUM(Profit) from EmployeeSales group by EmployeeId to get each employee's total profit. Now let's cha...

"tats the reason i..." STOP TALKING.
@AaronBertrand tats the reason i didn't post it as an answer :) — praveen 1 min ago
Is there a nicer way to do this?
0
A: Create a list of date ranges from a list of dates

Polish PrinceThere may be a more elegant way of doing it inside the CTE, but here's my solution. WITH cte (rowNo, itemNo, dueDate, amountDue) AS ( SELECT ROW_NUMBER() OVER(ORDER BY [Due Date]) rowNo, [Item No], [Due Date], [Amount Due] FROM loans ) SELECT a.itemNo, a.dueDate, CASE WHEN c.dueDate ...

On 2012 you can use lag. Also hard-coding the dates looks kind of suspicious to me. I didn't read the question (it's overly long and they didn't bother to specify the version), but are those special case dates that should be hard-coded?
@PolishPrince That's definitely cleaner, but the problem he's having is that he's hitting the recursion limit, which defaults to 100. You can alter it with the MAXRECURSION hint.
16:04
@MikeFal Ahhhhh... I see thanks for noticing that
@AaronBertrand Seems like it's just for a one-time report
16:23
@AaronBertrand Do you know if enabling/disabling optimize for ad hoc will dump the plan cache?
@MikeFal top of head, don't know. You'd think you'd kind of want it to, though.
@AaronBertrand I agree you want to, I don't think it does it by default. When I was testing, I executed a DBCC FREEPROCCACHE just to be sure.
I'll test that.
Yeah I'd be surprised if it doesn't, given the number of others things that can have that result.
This is about the only one that is actually a logical by-product. It certainly isn't intuitive that it happens due to RECONFIGURE after changing xp_cmdshell or CLR settings or even show advanced options for sp_configure.
But I will confess I have not tested it either.
When you turn the setting on, it should have an immediate impact, e.g. next query knows to compile a stub. In which case the system would have to know to not match an existing plan for the same hash.
0
Q: Creating a sql stored procedure

user2050577I have the following code to create a stored procedure. The SP should check if a date exists in a table and if it does then pull a value from that date. If it doesnt then pull a value from 2 days ago. It errors when I try to create it; I get incorrect syntax on the second BEGIN. USE [Gas...

Missing parenthesis - please VtC
17:06
@JackDouglas @JNK all I was saying is if a post gets deleted, the new user never sees it. How do we help them improve?
@gbn thanks for that geekpr0n link earlier to Joe's page.
JNK
JNK
@jcolebrand I think they WILL see it though
Seriously this person is bugging me
This answer is getting a lot of upvotes. When upvoting, consider the OP's evident level of skill and knowledge! If she were to implement this solution, would she really know what she was doing, and in six months when another beginner looks at the code, would they? — Jason Swett 58 secs ago
@bluefeet I considered your evident level of skill and knowledge. And upvoted. :)
@JNK and I don't. Let's ask in the TL
JNK
JNK
@jcolebrand find out for me, need to run out for 20
17:20
already asked
Is @bluefeet being criticized for having and answer that is to good?
will ping you with a response
@Zane the guy doesn't like that he isn't getting as many up-votes. Against my typical ethics but in this case I gave a -1 for telling other people how to vote. If he didn't have an answer in the race (and it was a more warranted situation in the first place) he might be taken more seriously.
JNK
JNK
@AaronBertrand He doesn't know SQL at all either but keeps posting answers on it
...and I wouldn't have been able to down-vote him. :-)
17:22
@JNK @jcolebrand This might be a dumb question but non-registered user cannot ask questions, correct?
JNK
JNK
he has some pretty terrible SQL answers in his history
I think Swett was trying to imply that the questioner is clueless, not BF
@bluefeet not true, afaik
Or I can't read.
JNK
JNK
you can post an Q without an account
17:24
@JNK ok, I had never seen it until yesterday afternoon and was utterly confused
JNK
JNK
@bluefeet easy way to test is open a new incongnito window and post one
@AaronBertrand it certainly seems to be a case of point jealousy. Very silly.
@JNK It looks like SO requires some sort of login but DBA.SE allows guest
The question I found is on SO.
I guess the OP doesn't like my answer either
it makes sense to create a function for this, @jason - thank you. I suppose where I'm struggling is that my results are pulled in from a query, split into something like $row['number_id'] along with other tabular data (and while I despise using tables, if it's tabular data I have limited options). I will work on this one and thank you for helping me think this through farther than just an answer that will work, to get to an answer that will work well. — Melanie Sumner Smith 5 mins ago
@bluefeet what do you mean? OP accepted your answer.
@AaronBertrand I see that now. They posted that comment earlier.
17:32
ah ok. I didn't investigate the detailed log. :-)
Please VtC as a dupe. This is another common, common question that people don't %$^&*^#$ search for before posting.
0
Q: Yet another Conversion failed when converting the varchar value 'n' to data type int

Peter CI have the following stored procedure: CREATE PROCEDURE [cafgAddCoreID] @HoldingName nvarchar (50) = null @CountStart int = 0, AS DECLARE @sql nvarchar (50) DECLARE @bit nvarchar (200) BEGIN SET @bit = 'MTR1- + CAST ((' + @CountStart + ' + ROW_NUMBER() OVER (ORDER BY [FindNo])) AS NV...

@AaronBertrand lol nice title edit.
1
Q: SQL Statement - How can Improve speed with indexing

neojakeyI have a script that has to look throught over 2.5 million records to find if a member that has an unread email. I want to know what can be done to improve its speed. Currently it can take up to 8 seconds to run the script: SELECT TOP(1) MemberMailID FROM MemberMail WHERE ToReadFlag = 0 AND To...

Am I the only person who finds the question slightly irritating?
Seems like he's basically asking for an indexing tutorial. And I don't find that any of the answers will be satisfactory - sure you can make this one query faster with a good index, but at what cost? No free lunch.
@JNK I just tested it: an even an unregistered user gets the notification of the comment after the answer has been deleted (and can see both answer and comment)
@JackDouglas so is it just questions that leave low-rep users in the dark?
@AaronBertrand yes that's right
17:46
ack ack
Ok, so I'll start deleting the A and we'll rely on comments for notifications
@JNK note the above, find the transcript link starting here: chat.stackexchange.com/transcript/message/8673745#8673745
Roy
Roy
17:59
Anyone know if I can search for a combination of tags on dba.se? Say .. amazonrds and oracle perhaps?
[oracle] [amazonrds]
(that's the intersection not the union)
Roy
Roy
smooth, thanks @JackDouglas
Hrm .. any reason why say the Oracle-10g tag isnt a child of Oracle?
JNK
JNK
@Roy nobody has caught it yet I'm guessing
the Oracle folks are all busy working extra jobs to pay licensing fees
Roy
Roy
Hrm .. is a tree structure supported or just equal synonyms?
I need a license? :)
JNK
JNK
@Roy you haven't paid. One second, let me notate your account. You should get a bill in 5-10 business days.
Roy
Roy
18:15
What? You mean i need an Enterprise Edition license to rebuild indexes online? :D
JNK
JNK
@Roy OK valid point!
@Roy I think the most efficient way to search at dba.se (or SO) is using Google (and site:dba.stackexchange.com )
There are very few questions tagged with amazonrds at dba.se
18:34
it's easy to understand your answer because of the explanation but I am going to accept the code only answer.
Thanks @bluefeet, for you elaborated answer, easy to understand the way you explain it! :) — Matthias Vanb 19 mins ago
Roy
Roy
@ypercube Aye, and only one concerning Oracle. I guess Oracle RDS isn't exactly mainstream :)
Still only two questions tagged oracle-database-appliance though. Could the appliance really be so easy to use that it raises no questions? :s
Only takes 13 of those XL RDS instances to compete with 1 ODA. That's only $250,000 per year.
Compared to $300k for ODA fully licensed
Oh, looks like I have started one of those ranting monologues again. I'll be quiet now
19:09
Today's XKCD is driving me crazy.
19:21
@Zane probably related to his wife's cancer?
Should I detach or take offline to move the DB files between two servers?
@jcolebrand BACKUP and RESTORE... And do it quick before Aaron weighs in.
trololol
@jcolebrand If you detach and it has a problem, you might not be able to reattach, plus you always can just fall back to the running instance.
8
A: Should I migrate data using detach/copy/attach or through backup-restore-replay?

Aaron BertrandPersonally, I would avoid the detach/attach mechanisms. Especially in SQL Server 2000, I just don't trust that you will always bring the server back up and be able to attach those files. I've heard plenty of stories where this didn't happen cleanly - just because you have a Plan B doesn't automat...

@jcolebrand I think you should just write an EF app to move the data
@billinkc that would be so much easier, right?
19:27
@jcolebrand Only if you have webscale data. Otherwise it's not worth spinning up the shards
@billinkc Of course, that is best. Via the CLR using PowerShell.
why are my logs a gigabyte each when my dbs are 300M tops
I bet it's because nobody is doing backups ...
@jcolebrand as long as they've grown at 10% starting at 1MB, you'll be fine
2
I smell another trolololol here
@jcolebrand Sorry, that's probably the Indian I had. So delicious
19:36
Hrmmm...where is @swasheck? I wanted to poke him about his user group experience last Thursday since the loser didn't hang out for beer afterwards.
19:57
@MikeFal haven't seen him all day. Work must be nuts.
JNK
JNK
I'm using a lot of DISTINCT in an ETL build process right now and it makes me feel dirty
@PaulWhite Just been to your blog. That conference reads like a who's who of SQL Server heavyweights. Anyhow, bundling a $300 cash back or Surface device into the registration?!
please VtC, talk about no details
-1
Q: transforming to a subquery

user2208931how should I write this statement using a subquery? SELECT customerName, ROUND(SUM(od.quantityOrdered*od.priceEach),2) AS mxm FROM customers AS c JOIN orders AS o ON c.customerNumber = o.customerNumber JOIN orderDetails AS od ON o.orderNumber = od.orderNumber GROUP BY customerName ORDER BY mxm ...

20:44
Please vTc, talk about comedy
-2
Q: where do search engines get the web pages?

alkisWhere does google for example, get the url of a page, which then crawls and processes? I mean the index page, the home page if you prefer. Is there a database with all the available web pages in the world wide web?

@PolishPrince Out of curiousity, why are you posting in The Heap a request to VtC a StackOverflow question (that's not entirely about DBMS)?? It's valid IMO and is something I might have asked years ago. Even now, I would love to read the answer to the question.
@RichardTheKiwi because we all do? (and it has database tagged)
@RichardTheKiwi Out of curiosity, why am I being singled out?
@PolishPrince because you are special ;-)
@Lamak I know I'm a prince and all ;)
@PolishPrince BURN THE HERETIC
20:53
@PolishPrince Because the others are database related and your one's tagged "database" in a liberal sense not as in DBMS? This is The Heap after all
Cue peasants with torches and pitchforks.
@RichardTheKiwi There are times when we run across flat out bad questions on SO that should be closed, so we will ask in here for some help in closing the questions.
@bluefeet Thank you.
@RichardTheKiwi I'll try to avoid requesting to vtc questions that aren't (entirely) on topic on The Heap
Currently there are over 50k questions in the close review queue, so if we can move the process along on some bad database questions then we do
@RichardTheKiwi It may be valid question but it's not well phrased. And I'm sure you know where lists of second level domains can be found.
20:56
Just IMO, the question may not be brilliantly worded, but I was genuinely interested in what methods Google uses to scour new web sites. Domain registries? Blindly hitting IP addresses?
@RichardTheKiwi If you don't agree with the VtC request, then feel free to explain why. Or don't add a vote, there are plenty of times that I don't VtC when asked. Same with others
JNK
JNK
Also even if it was better written it probably is not a good fit for SO
@JNK agreed
@RichardTheKiwi Then the question has multiple issues, including being not constructive and being off topic
@RichardTheKiwi Which just brings us back to, why am I being singled out? For some reason it feels like this isn't the first time I recall you asking me specifically.
@PolishPrince I am not sure you are being singled out. @RichardTheKiwi hasn't been around The Heap for a little while on a regular basis, so he might not be aware that this happens
21:00
@bluefeet Just doesn't feel right when you posted a VtC request for SO right before me and @AaronBertrand earlier today.
@PolishPrince and that question does not look like DBA.SE related. You'll have to agree that most VtC requests here are about questions that could appear here.
@ypercube I agreed that it may not be entirely on topic but mentioned it none the less due to the database tag
@PolishPrince I know
(Database = list) vs (database = "database system") ... context. Anyway I'm not here to bash you @PolishPrince so I'm going back to work.
@RichardTheKiwi I still didn't really appreciate the comment.
21:30
Oh geez I'm sorry I missed all of that. Hey database people you're not allowed to talk about anything non-database-related in this chat room.
Chill Aaron, have a beer :)
I know it might be a silly question, but where's that mighty SSMS2012? Should I download the Express?
WTF, we have a mod invasion.
I'm sure you answered already, so please feel free to poke me with a stick
@all mods! go back, this is the basement..we do the chemistry lessons here (explosions..etc) :)
don't make us flood the basement >:p
wouldn't be very useful, wouldn't it? :-)
21:38
now that I have messed with this about a million times, does this look like the logic is correct?
0
A: SQL Rolling Total up to a certain date

bluefeetAs Gordon stated in his answer, you will have to unpivot the data in the points table. An unpivot takes the data from the multiple columns into rows. Once the data is in the rows, it will be much easier to join and filter the data and total the points for each account. The code to unpivot the d...

@bluefeet As long as it contains the word "pivot", I'm sure your or Gordon have it done the best way :-). First two sentences look alright.
@AaronBertrand Btw, initial tests on that optimize for ad hoc question I had show that the cache is not cleared when you RECONFIGURE, though it does look like it creates new query plans regardless. I'm going to poke at it further.
@Marian The problem with Gordon's answer is he did not include all of the logic, past 12 months for both active and inactive users. He only included active users
@MikeFal than those plans are quietly going to the bin.. They should be evicted in short time, as long as they are not accessed anymore, right?
@bluefeet He mentioned something about " In fact, you don't even have to worry about when a customer left, since presumably they have not collected points since then."
isn't that an answer to your question? He's basically saying that non active users don't matter
@Marian But that is not what was requested Now, what I want to do is create a query that calculates the amount of points that each customer has. (Current 12 months for active customers, last 12 months they were active for customers who are no longer active.)
Gordon is skipping inactive users all together and it doesn't sound like that is correct
Unless, I am interpreting the question wrong
21:51
@bluefeet Well, it's more of a matter of logic. Don't give a man fish, teach him how to fish. You both did that..so now the OP goes further as needed. I wouldn't go as far as do 100% for him, but I'm lazy.
0
Q: Using Standard SQL, how do I make a report with a top title?

zechdcUsing Standard SQL, how do I make a report with a top title? Last year I participated in a Database competition. The description said I could use MySQL, Oracle, or MS SQL Server. I choose MySQL because that is what I am familiar with. It said that I must write an sql statement using Standard SQL...

What kind of messed up competition is that?
@Marian Should be, though not for certain. I'm investigating. The way I understood it, making an instance config change that could affect the buffer pool (i.e., changing min/max memory) causes the cache to be dumped. I was wondering if the ad hoc optimization would as well, but it looks like not.
@MichaelFredrickson My question is why would you select MySQL for this?
From an administrative standpoint, I'd want the cache to be cleared as a 'better safe than sorry' thing, just to make sure old ad hoc plans were not being reused.
@Marian the way I feel is if I can solve the problem 100%, then I learn as well. :)
It's the nerd in me
21:54
Let's hear it for the nerds!
\o/
@MikeFal Well, yeah, but how do you make sure you're evicting only real ad-hoc plans? What if it's the first execution of a report that ran at that exact point in time? I'd say the LRU algorithm would be a safer choice.
@bluefeet see? that's why you have as much points as Aaron and we don't :-).
@Marian I'm not not all that concerned about evicting only ad hoc plans. I'm cool with a clean slate for everything. Most of this is a curiosity thing, though, establishing the different events that trigger a cache dump.
@MikeFal would you be ok also doing that in production? That's my thought mostly. On a dev machine, yeah, I'm 100% with you..
@Marian Yup, totally cool with doing that in production if I have to. Usually I try to only recompile what I have to, but in the case of this sort of configuration change, I really don't have an issue with the system recompiling everything. It's not like I'm doing a lot of it. :)
@MichaelFredrickson wow, I remember my Oracle 8 days, where I used command line for everything, because I hated the default UI tool. That's more of an output competition than db competition.
22:10
@Krazer Has @Aaron been banned from chatting? Why?
Because I called Richard a d*ck. A running joke we have (d*ck is short for Richard).
In fact my father's name is Richard and it's one of my middle names, so it's been a running joke my whole life. shrug
@AaronBertrand How many middle names do you have? And is "SQL" one of those middle names?
@MichaelFredrickson my full name is Aaron Michael Richard Bertrand. Michael after my uncle (now deceased), Richard after my father.
@ypercube not that I know of, but a certain amount of offensive flags (in a short period of time) being action will results in an automatic suspension
Are you still holding that grudge @Aaron?
22:18
@Krazer Ah, ok. And how long is such a suspension?
@RichardTheKiwi Hey now, no need to poke the bear, sir.
Are you still holding that grudge @AaronBertrand?
@RichardTheKiwi stop talking to me.
Geez, the things that amuse 5 year olds...
@MichaelFredrickson Should be SQL Server Execution Plans and Intervals. And datetime.. :)
Ciao folks, it's been fun, but if Richard is going to keep dicking it up in here, I'm going to take my ball elsewhere.
Let the mods suspend me from chat all they want. Assholes will always be assholes.
22:22
@ypercube It's 30 minutes for having a message deleted as spam/offensive. See this and this.
It also stacks. Spam flagging can also get you in trouble, if you abuse it.
mod flags are a bit more forgiving
@AaronBertrand :O Don't do that.. Stupid questions might just come from me! I'm still downloading that SSMS 2012. Dontcha want some silly questions on it? You certainly need a baseline for a future "Yet another ..." ;))
@Marian It's usually the bigger man who steps away when someone else wants to start a fight. Unfortunately.
@MikeFal I'm having a great beer. Why can't everyone share the feeling?
22:37
@Marian A great question. However, this is the age of the internet and the power of the troll.
@MikeFal eh, everything will be cool in the end. We're all men, not children.
22:58
@MikeFal Mike, I'm not sure what you're intimating with this and the next comment about "trolls", but from my perspective, if I filter out my comments and Aaron's for the last two hours, I don't see how you drew your conclusions. Btw, I only posted twice because the chatroom was telling me that it failed to post
Gah....stupid data hygiene issues. I must control the DBA pimp hand and it's desire to slap some of my app developers.
23:19
Has anyone seen @Zane after he got his new job? Is that still a good option? :)
@Marian I'm not sure he's started the new job itself yet. Plus, hard to judge a new job as being a good option until you've been there for 6 months. Always need to wait for the honeymoon to wear off.
@MikeFal Yeah, but I didn't see any of his messages after saying he got the job. Hope he didn't die of happiness..
@Marian He was on earlier today.
@MikeFal And you're right with that honeymoon feeling, I've been burned one, two times by it.. When I woke up it was a bit rough.
@Marian Yeah, it's hard. Especially if you take a job to get out of one you hate.
That's why I always check where I'm at after 6 months. Usually it's not to bad. All depends on the people you work with, I find.
23:23
@MikeFal For me it wasn't a job I'd hated, it was more a manager :). Classic, I guess.
@Marian Yup, that's why I left my last two jobs. Couldn't stand the manager.
It's a shame really, I'm tired of switching jobs because I hate someone.
@MikeFal It's a shame especially when the manager evolved from a programmer/dba position. You'd say they have the background.
@MikeFal Uhmm, need to develop a tortoise shell :).
welcome Mark!
@Marian That's the thing, though. Many skills that make a good programmer/dba do not translate to management. Kevin Kline talks about that a lot. It's a hard transition, hopefully I don't ever have to make it. :)
@mikefal went to springs for the weekend with the family. Just got back. Yeah, didn't hang out for long because - well - don't know why
@MikeFal Well I remember something about a tipping point where a man was put in a position higher than his skill. And from there nothing would work well.
23:30
@swasheck We thought you ditched us
@marian that's the Peter principal
@bluefeet negative.
@swasheck Did you enjoy the user group meeting? I didn't see you when things wrapped up, wanted to chat for a bit.
@mikefal I did. I'll definitely return. You ran up to talk to Tim and that's fine. I just looked around and thought that I wanted a dr pepper and went to find one and they were gone
@swasheck Not sure I remember all details, but I hope I'll have that problem only at age 120 :-).
Evening all
@MikeFal You sound like you're ready for the contractor life
23:44
@MarkStorey-Smith I am, it's a matter of finding the right contractor situation. I've been shopping around for a firm that fits, but haven't had a whole lot of luck.
Not quite brave enough to go completely independent. :)
23:55
Annnnnnnnnnnnd time to beat feet. Lates all, see you on the flip side.
@MikeFal Bye, have a nice evening.

« first day (811 days earlier)      last day (4354 days later) »