@TomV Thanks for the reply on the ssas question. The link was more about getting him to add detail, and get a feel for what a good question would look like, but I take your point :) Deleted my comment, added a new one.
@Erik Looks OK to me, though the question could use a little more description before the code, just to give people a clearer idea of what you mean by 'next n' rows, and also what the context is.
@PaulWhite In a word - no! If ther've been more than 5 days over 20C this summer, I'd be surprised. Also, England != Ireland. And that's Éire - note the fada - or long accent - over the E. Eeh-ruh - not Eh-ruh. Without the accent, the word means encumbrance - which the English have always found us to be! :-)
@PaulWhite Try finding it on a PC-BSD box! So far, I've installed MySQL and PostgreSQL - I'm going to do Firebird and SQLite next. I'm a mature student and this is all for a College project.
@Erik It's Caenorhabditis elegans - a nematode (round) worm used in molecular biology (my true love!) research. My handle means "truthful" in English (it's a French word), but it can also mean (in a roundabout way) "l'ace des vers" which is the "ace of worms" - also in French.
@Vérace Very fun. I took French in High School but I didn't make it to a French speaking country until 8+ years later. I know C'est vrai. (It's true) but I wouldn't have made the connection with Vérace
That is very true. My wife is Peruvian so I've spent a great deal of time in Peru and South America in general. I've often thought that I should have studied one of the other two languages my High School offered (Spanish and Japanese) since both would have been useful quicker, but as the saying goes... C'est la vie, non?
@Erik Oui mon cher, c'est la vie! - C. elegans is the first (only) eucaryote to have its genome completely sequenced. Yeah, yeah, the human one was sequenced in 2003 - so they say! Anyway, thanks for your interest in my profile pic., but I'll be AFK for a while (even an insomniac's gotta sleep! :-) ).
Hey guys quick question. I have a table that has licenses as a column. I want to obtain all the records of licenses "aaa" , "bbb", and "ccc". How do I do this again?
I can't seem to get this simple query for the life of me...
Is there anyone in channel that is not familiar with Ola's scripts? ola.hallengren.com
If so, and you are writing your own backup and index maintenance script - please stop.
Or look at the McCown's SQL Minion or Michelle Uffords script. Something, anything versus writing your own from scratch unless you have a specific use case that the above do not address
The EXPLAIN shows NO STATISTICS. These need to be updated.
Vertica will optimize the predicate in this case using SIP:
Sideways Information Passing (SIP) has been effective in improving join performance by filtering data as early as possible in the plan. It can be thought of as an advanced ...
How do I roll back a quasi pending edit? The only current answer dba.stackexchange.com/a/112234/72091 to my Windowing question had a major oversight in their view. I edited the answer to fix the view. Roughly 25 minutes ago mustaccio reviewed my edit and rejected it. Which is fine. The problem is the answer still shows as under review when I look at it, so I want to rollback my edit and add a comment explaining the answerer's oversight, as mustaccio requested.
lol (directed at the too late). I'm fine with it being rejected. I was just trying to help the author of the post. In the future I'll stick with guiding comments.
@JNK i'm on the fence here. both sides have legitimate points. the fact that firearms are so readily-accessible and defended here is absolutely bonkers. however, i also agree that if we take the guns away, we'll find other ways to kill each other. the HUGE problem is not checking to see if you're "crazy," it's how we handle mental illness in general. thanks ronnie.
But you could go special places if you want to shoot guns for sport or fun. You don't need them at home or on your person in everyday life. (Constitution notwithstanding).
anyway, there's the whole media situation too, they are all over this thing. There's even a first person video of the shooting. I don't have it in me to watch it though
@JNK and @PaulWhite I personally think both guns and cars have their uses and abuses. At the end of the day they are both tools that can be misused. That being said, I think we can all agree that no one's opinion is going to be changed today on chat regarding gun control, so I'm going to drop the subject. :)
I really want to accept this answer (the view with snapshot isolation is the path I'm going to take) dba.stackexchange.com/a/112234/72091 but they keep making it worse
Typically, I would use careful indexing and an optimized LIMIT query to fetch the keys of the rows for the page, then the rows themselves. I also prefer an indexed view for counts, where possible.
@PaulWhite The view hides the ugliness so it looks cleaner. It doesn't really solve any structural problems the snapshot helps with the concurrency issues
@PaulWhite lol reading the question helps ;) The bad things is I get duplicate rows on the client. If I'm on the second page my offset will be thrown off by an insert and I'll return a row that the client already has. I could ask the developer to filter that out but why make my life easier when I can make their life easier. :)
It seems to be throwing a fit that the patch specified for the LDF is not valid. However I didn't fucking tell it to go there to begin with. That's not even the right drive.
@PaulWhite ok I'll add it to my question, and some of the LEFT JOINs I'm using for other aggregates too so you can see the whole picture. I appreciate the help.
@Zane Is it possible that something unusual happened to the database during this log period, e.g. having a log file added? Have you tried FILELISTONLY/HEADERONLY? There must be something aside from LS being LS.
@Zane This would be really dumb but the first string isn't unicode and the second one is. I doubt that is the problem but it is the only help I can offer.
I'm having a dumb moment. Let's say I have two tables with datetime columns (because I do), with a one-to-many relationship. I want the first record from the many with the next most recent date from the one, but I'm stumped on the query and feeling really stupid right about now.
@JNK I used to use that approach until a kangaroo aficionado showed me that the correlated subquery would perform better for the data I was working with. And in find fashion, I just assume it's always going to be true
Both can be fine approaches. I used the row_number approach exclusively until I got to weird datasets and The Heap edumacted me about the correlated subquery approach