« first day (1645 days earlier)      last day (3214 days later) » 

2:03 AM
@bluefeet Jekyll??? really??? c'monman
 
 
3 hours later…
5:11 AM
@RoyiNamir Why would it fail? The date part is YYYYMMDD, which is unambiguous for conversion. Should be fine.
 
6:09 AM
@AndriyM If it was only a date , then yyyymmdd would be fine
But since there's also a time , then I believe ( according to the article) that there could be a problem
It is either only date or , date with time as ISO :
YYYMMDD
YYYY-MM-DDThh:mm:ss[.nnn]
(Correct me if I'm wrong)
 
He is talking about the older types, datetime and smalldatetime. They consist of both the date and the time. So it just wouldn't make sense if YYYYMMDD was unambiguous for those types but YYYYMMDD hh:mm:ss[.nnn] was not.
Anyway, it is easy to verify using Aaron's method (SET LANGUAGE), which I've just done :)
The reason he didn't include the YYYYMMDD format with the time part was probably because he was talking about dates specifically. YYYYMMDD is unambiguous regardless of whether you are specifying a time along with it or not. In contrast, YYYY-MM-DD is unambiguous only as part of the YYYY-MM-DDThh:mm:ss[.nnn] format
 
@AndriyM So , just to check , are you telling me that YYYYMMDD HH:MM:SS (notice no T) - will always be fine ?
 
@RoyiNamir Yes, that is what I'm telling you
 
So the only problem is with the seperators ?
 
You shouldn't take my word for it, though, even if I were Aaron. Just try for yourself:
SET LANGUAGE FRENCH;
GO
SELECT CONVERT(DATETIME, '2009-10-13');
GO
SELECT CONVERT(DATETIME, '20091013');
GO
SELECT CONVERT(DATETIME, '20091013 11:12:14');
GO
SET LANGUAGE ENGLISH;
 
6:24 AM
This should definitly be mentioned in the article
Thank you for correcting me and clarifying
Should I revert my edit here ? stackoverflow.com/a/19737882/859154
 
Well, the edit seemed unnecessary. But it may have made things better by replacing two conversions with one, and there's no sign that the rest of the code particularly relies on the previous format, so... I'd probably leave it to avoid making changes to the thread (and thus bumping the question to the top of the queue) again. But there may be other opinions.
 
I don't get it. the trigger works only for update( and supposed to , and also it's working fine). Heere he checks what kind of operation is this :
IF EXISTS (SELECT * FROM inserted)
       IF EXISTS (SELECT * FROM deleted)
               SELECT @Type = 'U'
       ELSE
               SELECT @Type = 'I'
ELSE
       SELECT @Type = 'D'
So U is the update one
But later the insert query only execute for I,D :
What am I missing ?
Isn't he after @type in ('U') ?
 
6:42 AM
Great, I'm back to zero when it comes to the role permissions in Postgres... Do I have to make it a User to give it access to the db it's the owner of?
(I granted the role login)
 
what if I have 2 para and I want to delete rows based on either both if provided or only using one whichever is provided ?
 
huh?
 
its a stored procedure
with optional parameters
 
@Learner You may be talking about dynamic search conditions.
 
oh, it's a bit early in the morning to decrypt questions :)
 
6:54 AM
@RoyiNamir Not sure but perhaps OR @Type = 'D' would suffice, because in an AFTER INSERT trigger, the result of COLUMNS_UPDATED() would have all bits set to 1.
(And thus the first condition, SUBSTRING..., would work for an insert.)
 
I was looking for something like this
8
Q: Passing sets and optional parameters to a stored procedure T-SQL - ASP.NET

VladimirA big task for me. I have a few questions. You guys already helped me so much, but I get one difficulty after another and progressing unbelievably slowly. These questions will better describe my tasks. I have an aspx page with the following controls: TextBox, CheckBoxList, DropDownList. They are...

thank you
 
7:32 AM
@RoyiNamir To clarify what I said, the IF is supposed to verify that there are things to log in the audit table.
The SUBSTRING predicate checks if the column in the current iteration of the loop is affected by the trigger operation. If it is not affected, the server goes on to presume that the operation may be either an INSERT or a DELETE and checks whether it is so (using the IN predicate). But, as I said before, the inserts should be caught by SUBSTRING as well, so the other condition could be just @Type = 'D'.
 
But D is delete
 
Yes
 
The task is to audit the current change. It can be any of the three operations. If it's an update, the trigger checks each column whether it is updated, so that it doesn't log a column that isn't updated.
If it's a delete, the SUBSTRING condition will return false, but the change should still be logged. That's what the OR @Type... is for.
 
Oh, that was my missing part
Thank you.
I need to learn this stuff (columns_update()) plus the ` mod 8` thing regarding number of columns
(what difference does it make 8 columns or more anyway....)
 
8:20 AM
morning
 
Morning :)
 
8:35 AM
morning
 
morning
 
morning
 
8:54 AM
^ Definition of union all
 
9:26 AM
morning
 
morning
mine has spaces at the end ^^^^
hmmm, SQLFiddle seems flaky
 
@JackDouglas They don't show for me. HTML must have eaten them
 
because SQL Server I think :)
@AndriyM can you edit my comment?
 
SQL Server doesn't eat spaces. It despises them. Well, ignores them anyway.
@JackDouglas No
 
9:41 AM
Is this a 'thanks' or is it a variation on wBob's answer:
-3
A: How to select top 10 records from each category

Zico SELECT x.* FROM ( SELECT DISTINCT cellId FROM table1 ) c CROSS APPLY ( SELECT DISTINCT TOP 10 cellId,COL2,COL3,COL4 FROM table2 t WHERE c.cellId = t.cellId ) x

 
@JackDouglas basically the same query, slightly adapted
 
It's a thanks. It shouldn't have been edited to remove the 'Thanks' though...
 
it's a thanks, I agree
 
More specifically, it's a "thanks, I used it like this..." Still not an answer to the question, just a comment on another answer.
 
Was a confusing one to review.
 
 
1 hour later…
10:49 AM
Not sure how accurate this is, but ...
 
11:22 AM
that doesn't seem right
though it's not so easy to find the bailout numbers
 
@TomV The best figure for Citigroup I can find through Google-fu is $479b. The Greek bailout is €323B as far as I can tell.
I think the 2.5 trillion cited in the graph seems inflated, although the source doesn't really go into how the metrics are derived.
 
Beware of graphs with no metrics ;P
 
Here's a quick list of the Fed borrowers:

Citigroup - $2.513 trillion
Morgan Stanley - $2.041 trillion
Merrill Lynch - $1.949 trillion
Bank of America - $1.344 trillion
Barclays PLC - $868 billion
Bear Sterns - $853 billion
Goldman Sachs - $814 billion
Royal Bank of Scotland - $541 billion
JP Morgan Chase - $391 billion
Deutsche Bank - $354 billion
UBS - $287 billion
Credit Suisse - $262 billion
Lehman Brothers - $183 billion
Bank of Scotland - $181 billion
BNP Paribas - $175 billion
Wells Fargo - $159 billion
That's the source. It lines up with the graph, so that might be the metric used for the banks.
I don't think all of that debt is just the bailout though, there's probably a big chunk of overnight rate lending from the reserve and assorted frigging with short-term securities in that.
 
11:42 AM
The Federal Reserve claims they only lent $1.7 Trillion to the big banks. Why the huge difference in totals? Because the Fed only counts the most outstanding at any one time.
from that link
indeed overnight loans which have been settled i guess
 
12:20 PM
@swasheck what?
 
@ConcernedOfTunbridgeWells The biggest component appears to be the Primary Dealer Credit Facility, which I've never even heard of.
It looks like it's overnight lending, as you say.
 
12:37 PM
@dezso I was hoping to see people fly
How come the fence is still there ?
 
@RoyiNamir me too - three of them were admitted to a hospital regardless
 
Heat or thrust injuries?
 
@RoyiNamir avherald.com/h?article=488c302d does not specify
 
@dezso You know Rarotonga's not in NZ, right? Anyway, that seems like a fun thing to do. Good on them. No one died.
 
Actually , I don't know what is more frightening : heat or thrust.
 
12:45 PM
Oh heat definitely.
 
Yeah wouldn't want too be too close :)
 
@PaulWhite in free association with New Zealand - here, in old Europe (that strange island excluded), a country is a more or less well-defined thing
 
@RoyiNamir There's a Top Gear where they did that.
This, I think, but it doesn't want to play here for some reason.
 
Same here , doesn't play
 
Every time I see such a huge airplane fly , I'm amazed like a little child.
 
And somebody starting up a 40-year old RB211 in their backyard.
Show me a picture of something fabulous and high tech and I bet I can find youtube footage of people doing something silly with it.
At least some of the time.
It's kind of like Rule 34b - if it exists, there's footage of youtube of somebody doing something dumb with it.
 
1:26 PM
QED
Close, but no cigar:
0
Q: 1 Powershell Script 2 SQL Tables

TheAceI am having trouble populating my second table in my SQL Server Management Studio. My first table ServerList contains all information in the screenshot below. The second table ServerDrives should then contain all the information regarding hard drive specs (free, used, letter, and which server ar...

Maybe I should edit the title ...
 
1:46 PM
@ConcernedOfTunbridgeWells Speaking in references again?
 
I enjoyed this, if only for the one funny paragraph: sqlha.com/2015/07/07/defending-fort-sql-server
"Unfortunately, the enemy is “change” and the DBAs have about as much chance of winning as cocker spaniel does in a fight against a pack of velociraptors. It really is just a matter of time."
2
 
@AndriyM 2 ... 1 ...
@mmarie The enemy isn't virtualisation as such - HW support from modern CPUs makes this quite efficient these days. The enemy is poorly thought out storage consolidation and the centralisation of storage taking control of this away from the DBA and putting it into the hands of the sort of people who can relate to SAN administration jobs.
Infrastructure: Yeah, we can put your 1.5TB EDW onto our shared NetApp. No worries.
EDW Team: Now the ETL process won't fit into the batch window.
Infrastructure: Must be your fault. Our new setup is much better than the old one.
EDW Team: The old one used to fit into the batch window on the 8 year old 32 bit server we first built the system on - on SQL Server 2000.
Infrastructure: Our NetApp is much faster than the old hardware.
EDW Team: It's the same code base and same database schema.
Infrastructure: Our NetApp is web scale
 
2:06 PM
lol @ConcernedOfTunbridgeWells
 
@ConcernedOfTunbridgeWells Yeah, I know. I've been there and argued with sys admins who couldn't understand.
 
EDW Team: It used to run on our old 32 bit server.
@mmarie I saw this problem in six gigs on the trot. On two of those the EDW was migrated from really crusty old 32 bit hardware, and on two others I could show the same ETL process running faster on my PC.
 
situation at one of your customers, big batch job needs to finish within the hour, infra is done by an external partner (not us)
batch job runs 30-40 minutes on a physical box w/ 128Gb ram
network boys come in "yes we're going to virtualise everything, this is going to a VM"
 
@mmarie It's not so much couldn't understand as having a vested interest in not admitting that the £500,000 SAN they spent a year lobbying for isn't quite as good as they made out. However, at least they've got a VMWare consolidation project on their CVs now so they're good.
 
heh
 
2:09 PM
"but since the hosts doesn't have enough ram, we're going to scale down that sql box to 64Gb ram, that certainly won't be a problem because our all-ssd 3PAR is soo much faster than the DAS in the physical box, we'll just put vhd's on one big volume and you'll see how much faster this is on the new hardware"
3 weeks later: "things seem to be running a bit slow on the new setup, whatcha think the problem is, should I add more vCPU's?"
being the prick that I am I told them "hard to diagnose over the phone, but you can try"
now they are exactly in that situation, having to explain a 250K€ investment brought down performance
 
At one point I used to work in the same building as a major storage vendor (you wouldn't have to be Einstein to work out who it was) and got somewhat friendly with a couple of their sales reps. Off the record, they would quite happily say that a lot of their DW customers use direct attach storage for the data warehouse systems as it's much faster than a SAN.
For streaming workloads (i.e. DW style table scans) you can get at least an order of magnitude better cost/performance with direct attach storage. It's quite easy to tune an old-school host-based RAID controller to pull 1GB+ a second of a single 2.5" shelf.
Show me an actual SAN in production where you can get that.
 
I'm pretty sure that SAN can do better than what it's doing now though
prob is the thing is installed by some regular "hey i do citrix, exchange, AD, hardware and stuffs" sysadmin
probably clicked next next next through the whole setup, created one large volume, threw a bunch of vhds or vmdks on the thing and thought "well it's SSD it's gonna fly"
 
The conventional wisdom is that for a DW workload you will get about 2-3x better performance if you tune your disks right - as compared to a system configured for a typical consolidation workload.
 
They do data virtualization rather than database virtualization. They gave me a whole bunch of marketing fluff at a conference a couple weeks ago, but the concept is interesting to me.
 
Also, host-based RAID has a much fatter channel to your machine, and you can tweak the disks to fit the workload. Also, it's much, much cheaper.
@mmarie Some sort of database replication technology by the look of the website, or have I misunderstood it?
Oh, database replication to servers hosted in the cloudz.
Or, maybe it works at the block level - it's not really clear from their site.
 
2:26 PM
so they are saying their solution is better than standard cloning a VM or replication for setting up dev/test environments with copies of prod data.
@ConcernedOfTunbridgeWells Yes, it is at the block level
 
@mmarie So, it's a block level replicated storage service?
 
I think. I'm still trying to understand it.
I mean, i know they told me it was block level. I just don't really understand how it works.
<---- Not a DBA or sys admin
 
@mmarie Fibre Channel and iScsi are just packet switched protocols behind the scenes. If you wrote a driver that tunneled something over I.P. you could mount any old shit over the interwebs.
Subject to how much bandwidth and latency you had to their servers.
 
So why is this useful?
This being their product.
 
@mmarie Saves having to buy a SAN if it's fast enough.
So, an iSCSI target is just an application you run on a computer that emulates a SCSI disk. With suitable drivers you can mount it as a block storage device.
In principle, a SAN controller is just a computer that imitates a block storage device while fronting some disks behind the scenes. It's the same principle.
Native Fibre Channel has a bunch of features for supporting resiliency such multiple routes between hosts and targets. Protocols like FCOE do something similar if you have switches that support the additional FCOE features. FCOE just lets you use ethernet cabling and modified switches, which are quite a bit cheaper than trad Fibre Channel.
 
iSCSI is an application level protocol tunneled over IP. FCOE sits at the same level as IP, operating directly over Ethernet.
 
@mmarie we POC'd it ... it overpromised and underdelivered
 
@swasheck oh ok
 
@swasheck What did you want to do with it?
 
@swasheck Reading between the lines I presume it's sort of iSCSI-as-a-service type of architecture with some feature to replicate block level storage onto their servers.
 
2:47 PM
@ConcernedOfTunbridgeWells The place I work now has such a SAN, but it's flash-based and not used enough to be continually saturated before it hits the NAND yet. We can do about 1-1.7 GBips scans over iSCSI with 2 10gbps NICs on each target. All the other SANs I've worked with topped out somewhere below 500 MiBps though.
And of course you could still get much faster performance for less hardware cost with local PCIe flash.
 
@JamesLupolt One of my quiet hopes is that flash-based SANs will alleviate the worst of the sins of incompetent storage admins. With a bit of luck it should be possible to implement a reasonably quick EDW platform on shared flash storage.
 
@ConcernedOfTunbridgeWells It's about to happen here in the next few weeks. I think it will go fairly well.
 
@mmarie make things go faster and eliminate overall storage footprint
 
@ConcernedOfTunbridgeWells we have the same storage as @JamesLupolt but we're on Fib(re|er) Channel
@mmarie it's a lot of hype but, in the end, we found that it gave no added benefit over our other storage vendors' crappy software.
 
2:56 PM
@swasheck Thanks. That's what I really wanted to know.
 
@swasheck 'SAN' and 'make things go faster' are concepts that don't really go together.
 
@swasheck Just curious, what did you test? I'm just wondering in case I get asked about this product
 
@JamesLupolt honestly ... it was a few years ago when i was first hired here so i didnt do the testing. otherwise i'd have more input
 
@JamesLupolt I wouldn't have categorised SATA or SAS RAID as 'complex'. It's really not rocket science.
 
@ConcernedOfTunbridgeWells my understanding is that it's more of an appliance that sits between storage and consumers
 
3:02 PM
@ConcernedOfTunbridgeWells I thought the same. I guess the author was thinking of things like short-stroking?
But even then, not really that hard.
 
@JamesLupolt my inner Beavis and Butthead always chuckles at that
2
 
Joe Chang had an angry post about SAN configuration recently. sqlblog.com/blogs/joe_chang/archive/2015/03/02/…
 
great post. (FWIW) all of the anecdotal evidence agrees with him. kendra's comment, while noble, doesnt seem to be rooted in reality.
also ... this could be a problem:
> 8Gb from host to switch, 4Gb from switch to SAN, and presumably 4Gb on the SAN backend?
max theoretical throughput will only ever be 500MB/sec ... not counting overhead. but that's still 8000 extents per second
 
@Mogsdad Nah. This was from a time when close reasons didn't hurt people's feelings — Kermit 21 secs ago
 
3:23 PM
@JamesLupolt Short stroking isn't a big deal for DW workloads as you're aiming to optimise for streaming I/O.
Basically you're after:
o Large stripe size (>=256k)
o Aggressive read-ahead policy.
o (Maybe) tweak the cache segmentation and read-ahead parameters on the disks.
In practice, the vendor probably wouldn't let you do the last one yourself. A vendor with a modicum of technical savvy in its pre-sales staff should be able to arrange it for you, though.
I will say that I've tiddled with mode page tweaks on F/C JBODs in the past and you can get some performance improvement by doing it. The same would apply to SAS or SATA for much the same reasons.
@JamesLupolt Also, I'm not sure why 'MPP appliance' sits at the 'Cheap' end of the scale. Teradata and Netezza are proprietary (and therefore buttock-clenchingly expensive) big iron.
 
3:40 PM
@ConcernedOfTunbridgeWells Yes, that one has me puzzled.
 
@JamesLupolt I guess it's possible that OP is thinking of a Hadoop cluster on commodity hardware, but I don't see that as being relevant to data warehousing.
 
@ConcernedOfTunbridgeWells I've heard PDW/APS/whatever it's called now is £500k+ plus, so I guess it's not that either.
 
@JamesLupolt Probably not.
I can't think of any remotely mainstream parallel data warehouse platform that could be described as cheap.
 
clicked the link. it was an empty list.
 
I think I've been using too much SQL. I keep typing my searches into Google and hitting F5.
 
3:53 PM
does it work?
 
Try adding OPTION (RECOMPILE) to your Google searches
3
 
clear the cache
 
@swasheck Didn't read the title at first and it was already funny.
 
indeed
 
5:00 PM
Great to talk to a full house at PGDayUK, thank you for your feedback! #PostgreSQLUK.
@ConcernedOfTunbridgeWells not sure if we discussed this with you and @JackDouglas at the drinkies or with @PaulWhite here but Parallel queries are planned to be added in Postgres for 9.6 version (release end of 2016)
 
Ok.
 
@swasheck You going to the lunch?
 
 
2 hours later…
7:26 PM
@MikeFal yes
 
@swasheck Thanks for the update, chumpzilla.
 
@ypercube Have you heard much about the implementation? When I looked into that a few years ago it sounded like there were plans to do it with process forking.
 
@MikeFal no porblem
 
I keep meaning to go to the London PG users group, but I'm always tired or whatever.
 
 
2 hours later…
9:26 PM
@Lamak you around?
 
@ypercube O for awesome.
 

« first day (1645 days earlier)      last day (3214 days later) »