« first day (1869 days earlier)      last day (3295 days later) » 

09:21
0
Q: How exactly the row visibility is determined?

dezsoIn the simplest case, when we insert a new row into a table (and the transaction commits), it will be visible to all subsequent transactions. See xmax being 0 in this example: CREATE TABLE vis ( id serial, is_active boolean ); INSERT INTO vis (is_active) VALUES (FALSE); SELECT xmin, xmax,...

just for the adventurous souls
@dezso You created a tag called visibility?
@PaulWhite I dared to
do you see a problem with it? I realize it might be a narrow-scoped one :)
maybe row-visibilty would be better
@dezso I don't know Postgres well enough to judge. A single-question tag with no wiki entry seems a bit dubious though.
@PaulWhite isn't it a thing for all systems using an MVCC model?
@dezso It's not a term I have encountered in a SQL Server context, no. There is (7 questions), which also seems rather dubious :)
It's not a big thing for me, I was just wondering if you had put a lot of thought into it.
> Most common tags already exist on a mature site. You should always favor existing tags; only create new tags when you feel you can make a strong case that your question does cover a new topic that nobody else has asked about before on this site.
But I might just be grumpy because Glenn was listed first.
09:35
@PaulWhite from my research, I think the questions qualifies as an example of the latter
I don't know how dependable it is, but there is a list: en.wikipedia.org/wiki/List_of_databases_using_MVCC
Well fair enough then. I guess I'll look forward to the wiki excerpt :)
@PaulWhite sure
10:01
Feel free to rename it to if you think that's better.
Just out of curiosity, if you guys Google 'row visibility' are the results you get about controlling whether rows are visible in a Reporting Services report?
(I'm just curious, not stating an opinion on whether row visibility is a good tag for MVCC issues.)
@JamesLupolt Yes.
@JamesLupolt Yes
@JamesLupolt yes
Maybe that's not a terrific idea then.
10:05
too late ;)
rolled back
I am in a rollback war my myself
Ooo I wonder who will win.
Hi all,
For those who aren't aware, I'm going into surgery on 22/2. I will be in St. Thomas's hospital (next to Waterloo station) for about a week after that. Beckett Ward, 5th floor, East Wing.
8
@dezso have you read this, by the way? momjian.us/main/writings/pgsql/mvcc.pdf
3
@ypercubeᵀᴹ not yet - just seen it from my latest search
thanks
@ConcernedOfTunbridgeWells Sorry to hear that. What's wrong?
10:13
@JamesLupolt Dodgy ticker. I'm having a heart bypass.
@ypercubeᵀᴹ Bruce has quite interesting stuff in his presentations
@ConcernedOfTunbridgeWells Damn dude. I hope everything turns out OK. It seems like an excellent hospital with great consultants for what it's worth.
@JamesLupolt consultants?! like Accenture?
@dezso In the UK doctors practicing a speciality are known as 'consultants'
It confused me at first
@JamesLupolt Yes, it's arguably one of the top hospitals in the world. The surgeon says the operation has a better than 99% survival rate so I should be OK.
10:21
@JamesLupolt yeah, I realized - but in this room it is hard to not think about the other type
@dezso Gods forbid.
Now I have a horrible image of an Accenture consultant operating on my heart.
'Suturing up your chest wasn't in the spec. That's time and materials.'
5
Plus, the operation done to their world-famous standards.
Hm. We seem to have punctured your Aorta. Can we find a tactical solution?
Now I am really sorry :D
We have cut your chest open, but we de-scoped the bypass grafts.
Maybe we could put in BizTalk.
apropos, my physician once made the joke, after realizing I used to be a biologist:
Do you know what is a real gift?
The aorta, as it's always from your heart.
2
10:54
I have a feeling this will be in vein
Hi, Welcome to the site. Please post table definitions, sample data and expected output. If you have tried anything so far please post your attempts too. — Tom V 27 secs ago
@TomV that's also a cardiovascular thing
@TomV Vain.
11:14
@PaulWhite Maybe he's injecting something for the pain
4
@MarkSinkinson Ah maybe yes
11:47
@PaulWhite You always think it's about you, don't you?
12:01
@PaulWhite ah thanks
Any VMWare people about?
@billinkc Not physically.
@billinkc I had some dreams, but they were clouds in my coffee.
@billinkc Depends on how advanced your question is
2
12:19
When I look sp_blitz results, it warns me that we have some seriously crappy disks
It's pulling from sys.dm_io_virtual_file_stats to make said claims
This client has apparently complained from day one that the virtualized instance performs terribly.
It's my understanding when you present disks to VMs you can ... present them as an external resource in which case the overhead is very low or you can also virtualize the disk itself which ... looks more transparent to windows but buffers the hell out of actual writes
and it's a very poor understanding I have since I've never done this
Anyways, assuming what I barely remember hearing people discuss is at all accurate, is there a way I can tell from within the guest OS whether they've done the dumb or is that only available to me in the host?
I believe you are talking about passthrough disks
that used to be an issue, but shouldn't be anymore
Hmmmm
I don't see a lot of installs where people didn't go for vmdk out there anymore
Back in the last 2000s when a company I was at went all in on virtualization and then all out on it, they ran into something that they did wrong with regard to storage
I thought I had heard that could still be an issue at that various sql saturdays but again, it could just be me not having enough context to understand it properly
12:41
There's plenty you can do wrong to the storage
Thin provisioning with lazy zeroing for example, but I wouldn't know how you can check those things from the guest
The simplest VM error (one I've seen a few times as a consultant) is placing multiple databases (and/or OS'es) on the same physical drive/LUN. That'll kill performance every time. :)
@billinkc are you seeing slow writes, reads or both?
io_stall    io_stall_read_ms  io_stall_write_ms  num_of_reads  num_of_writes  size_on_disk_mb
1515166044  1515163800        2244               3950265       43             82300.000000
Reads. Just a little though
400ms, on average :s
going to be hard to troubleshoot from inside the guest
13:04
@billinkc Do you what the hypervisor is?
E.g. Vmware ESX, Hyper-V, Xen, etc
In Hyper-V I saw much lower latency when making iSCSI connections over TCP from the guest compared to presenting passthrough disks (with the Hyper-V CSV cache on) to the guests.
I doubt that would explain 400 ms reads though.
@JamesLupolt I do not but happy to relay any and all questions to the client
If the disks are being accessed over iSCSI from the guest, you'll see TCP connections (typically port 3260) in the guest machine. If they're pass-through you might be able to tell as much from the guest in Device Manager. Trying to see if I have a VM with pass-through disks here.
have I been redirected to DBA chat room ?
or is it a wrong number
13:19
@Mathematics Yes
At that latency they probably just need to do some basic troubleshooting to figure out whether there's a bottleneck on the guest, the hypervisor, a network link, or the storage.
@MarkSinkinson Yes to which statement
@Mathematics If you hover your mouse over my statement, you would see which one it is replying to. But yes, this is a DBA chatroom
thank you thank you, that's helpful :)
Does seeing the disks presented as "VMWare Virtual disk SCSI Disk Device" in the disk manager confirm that it's pass through?
netstat doesn't show any connections listed for 3260
13:30
According to this, "VMWare Virtual disk SCSI Disk Device" can be either VMDK or RDM (terms defined in Tom V's link above)
I don't really know what passthrough disks are in VMWare
I have been told, dba's are mostly hidden hackers
and they never agree or reveal this to anyone
@Mathematics no, we aren't
2
@dezso that at least makes my 2nd statement true ;)
@Mathematics I wouldn't say that DBAs never agree to being hackers. I would simply say that they never agree period
@Lamak but we are definitely not hidden, right?
13:38
@dezso Well, for what it's worth, I can't see you.
well, I am not dba neither am a hacker
@dezso I don't know what to say. I want to disagree to go with the joke, but I remembered that I'm not actually a DBA
@JamesLupolt RDM, raw device mapping
@TomV Thanks
@AndriyM oh
14:07
Developer walks over, asks "how many OR's can a query have"
I'm worried
@billinkc is anybody responsible for the storage?
I am thinking about a database structure, but it just doesn't makes sense at all
14:39
@Mathematics You can always ask questions
@TomV Unknown. We're only there for the BI side of things but when it takes 8 hours for a query to run, I gotta look around and see what's wrong
15:00
@billinkc You could just run chrystaldiskmark on that server and on another one you know works well from inside the guest to see if there really is a storage issue (or sqlio/diskperf if you need more details)
Preferably outside of business hours ;)
Then present evidence that there is a problem (or not) and have the other teams/consultants assist
Challenge with that, and all the work I'm doing for this quarter is that it's this fixed bucket of support hours. Nobody wants to use those hours to do discovery on things that weren't set up correctly long ago and I'm apparently the only one who looks at things and asks questions.
Probably a good indicator they shouldn't put me on support work...
@Mathematics @Mathematics Hi. Since it seems that you are interested in asking a database structure question, you might find this series of posts of help.
@billinkc you don't actually need to look around
There is some truth to that
"some"
15:24
@ConcernedOfTunbridgeWells good luck, my good man, wish you all the best
15:47
I wish your surgeon even better luck
LLLLLLLLLLUUUUUUUUUUUHHHHHHHHHHHHHHHHHHHHHHHCCCCCCCCCCCCCCCCCCKKKKKKKKKKKKKKKKKK‌​KKKKKKKKK
You speeled that wrong
yeah
i substituted an "L" for "F"
it's still spelled wrong
just wanted to put emphASSis on the correct sylLABble
16:03
@swasheck that reminds me of high school band. :-)
@swasheck I assume you will be at the speaker dinner on Friday?
unless i'm still working on my presentation
@billinkc So do I.
@swasheck what's your presentation about?
Zeus vs. Atlas
good luck
zeus would beat the crap out of atlas
16:10
TIL BLOBs on a separate page can cause read-writer deadlocks between a single-row insert and a select on a table with a clustered index and no nonclustereds. Hadn't really thought about that before...
16:22
@JamesLupolt learn through reading, or experience?
ugh
@swasheck Sperience
tipeing is hard this morning
There's a newish app here with an NTEXT column for some reason
@JamesLupolt because ... WHY NOT?
Was causing deadlocks that it took me a while to understand.
The funny part is, all they are storing in the column is ''.
16:23
@JamesLupolt what a terrible idea
@dezso You mean highlighting favorite users on Stack Exchange?
@Lamak I would say that, except the person who put it there made enough money to quit and do whatever he feels like for a while.
well...I'll try that approach and see what happens
@JamesLupolt Wait a minute, was it NTEXT that did that to him?
That's like saying Bill Gates' haircut is a great idea because look at all the money he has
16:30
@AaronBertrand yes
I'm just joking.
Me too
I apologize if anyone starts an NTEXT cargo cult to try to make money.
That's the danger of saying things in a public chatroom.
16:34
14
Q: Stack Exchange - Favorite Users

SlanecTL,DR: Browser addon that highlights answers and questions by your favorite users! See it in work: And the easy config via user's profile: Just like many other people before us, even we once began to wonder how to favorite a user on Stack Overflow (or any other Stack Exchange site). Wh...

Unfortunately, it seems to be tied to display name rather than user ID (I guess so that it works cross-network). This is great for relatively unique display names, but horrible if you have a user you (dis)like named John.
> Could not install package: 'UTILITY_PROCESS_CRASHED_WHILE_TRYING_TO_INSTALL'. Could not install package because a utility process crashed. Try restarting Chrome and trying again.
will give it a try later
and thanks
You need to go to their profile. If the extension is installed and enabled, you should see a star there somewhere (though I haven't tried it since the profile overhaul).
@AaronBertrand I could add their name in the extension's settings page
@dezso Cool, I never did it that way though
17:03
Good Morning All
Is anybody going to SQL Saturday Chicago?
@AndriyM Was working at a client site with a CRM consultant from another company who kept adding ntext fields in a custom table in Dynamics because "Well, i want to make sure they have enough room to enter the information they want" We looked at the data to be entered, and the max length was 64 characters.
@mmarie That's what I call playing safe :)
@AndriyM It wasn't because of that, but the CRM consultant was asked not to return. It made me (and the database) happy.
@Mr.Brownstone nope. Didn't submit to speak. Lost track of time.
17:19
@mmarie I'm usually never sure what type to choose for storing large pieces of text. Don't want to make it too small ("would varchar(1000) be enough or should I perhaps make it 2000?"), but on the other hand, always declaring it as varchar(8000) or varchar(max) (just to play safe) would seem overkill.
Don't face this problem very often, though.
@Zane I will be attending but not speaking. I am hoping to speak at the next PASS event in Chicago though, it'll be my first time presenting.
17:46
150 new features in MySQL 5.7: thecompletelistoffeatures.com
> Username size increased to 32 characters
A lot of default changes are being sold as "features"
Renaming an index is now metadata-only! Hip-hip hooray!
@AaronBertrand and all of them will be reported as bugs by developers
Yes they certainly will
Also SET password='' now accepts a password instead of hash - yay security?
i'm curious about this one
> mysqlpump
17:52
They leapfrogged past SQL Server though, it seems, on the JSON front.
yeah, this is more a list of changes than features
kind of annoying
> The mysqlpump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another SQL server.
so they have pump and dump
@JamesLupolt Is this an official announcement? Seems like a random guy's URL.
It produces horrible text-based backups faster than the older method
@ypercubeᵀᴹ It's Morgan Tocker's site (a product manager for mysql)
We should ship all our change lists as an enumeration of "new features"
17:54
updated statistics
updated statistics
updated statistics
updated statistics
updated statistics
updated statistics
updated statistics
that's 7 new features right there!
@AaronBertrand sweet. i talked to a guy this weekend who believes that the president had scalia killed
this place is nuts
absolutely nuts
@swasheck Can you tell whether this is a parody site?
i cant tell
Me neither.
17:57
but now i'm on the naughty list at work. thanks
I was kind of hoping the whois would show it belonged to The Onion.
@AaronBertrand this does not surprise me in the slightest.
18:28
I wonder if MySQL now supports CTEs and window functions
0
Q: Migration from Microsoft SQL Server to MySQL With clause

ahmed nagiI have the following with clause which written in SQL server WITH myCTE as (select ROW_NUMBER() over (order by AmountViewed asc) as RowNum, AmountViewed, COUNT(peopleid) as Peeps, sum(COUNT(peopleid)) over (PARTITION by vpackid) as totalpeeps, MAX(...

Not sure about CTEs. No window functions in MySQL, but they're coming in MariaDB 10.2
So that query will be fun to re-write.
@JamesLupolt not interested.
It's not very tempting is it.
I'm pretty happy in my little SQL Server niche.
18:36
Me too.
Boo
> Database 'db_6_253a8' already exists. Choose a different database name.
18:58
@AaronBertrand Yeah. Most difficult part is ROW_NUMBER()
I envision multiple self-joins
 
2 hours later…
20:34
@AaronBertrand I got the same error a few days ago.
Did you use dbo. prefix?
Uh, yes. Now I'm getting GATEWAY_TIMEOUT
I think I removed it to work. And then it worked, like 1 out of 10 times ;)
That's stable
No, fails with or without schema prefix. Or when I don't create a table at all.
20:49
Looks like a NoSQL gathering ;)
21:15
@ypercubeᵀᴹ Are you going to protest?
89 EUR is not a bad price. I might go if I don't change jobs.
22:13
@JamesLupolt do you do that often?
22:23
Does using partitioning functions for a table affect log usage in some way that is dreadfully non-obvious?
CIP, I have a table, estimated row size is 300 bytes. Clustered, but non-unique, index on an int column. One unique NCI on two ints. Loading ~ 500k rows via TSQL (INSERT INTO T1 SELECT * FROM T)
Simple recovery model. It runs for ~30 minutes before the log hits about 30GB and we run out of space on the drive
I'm about to drop the pf to test but thought I'd ping the collective brain
@dezso Protest database systems that aren't based on relational theory? Or attend conferences?
Only the latter.
There is a (partly) NoSQL conference in England that isn't too bad: allyourbaseconf.com/2015
nevermind, the code I put in there that is even documented to say "this shouldn't find any rows" was ahem, finding a few rows.

« first day (1869 days earlier)      last day (3295 days later) »