It is a lot to take in there and I doubt that I get it all but to me it looks like you are looking from something like this.
from Content.Photo as P
inner join Content.UserPhotoAssociation as UPA
on P.PhotoId = UPA.PhotoId
-- Older than CutoffTime
P.Created < @CutoffTime and
-- My photos
UPA.UserId = @UserId or
-- Photos by someone monitored by me
UPA.UserID in (
from [User].CurrentConnections as CC
where CC.Monitor = @UserId
order by P.Created desc, P.[Key]
Of course you need to add all the other stuff of counting and filtering but that is what is the gist of it as I understand it. And a bit simpler than counting the values for fetch ... offset before hand.
Posted here first before posting an because there is a good chance I have missed something important.
Joins is not recommended if you need good performance by your SQL query. Join will consume Memory and resource. Therefore if you are connecting big tables then it will take much time to finish given search process. Inline query also not recommended since it will save temporary table of given inl...
I have .jason file in my mac book, that I want to load in postgres server,
Kindly navigate me how to do it in simple way, I'm not jason script user, please describe me each and every step very clearly.
Not that I'm invited but I don't think I'll be able to fly to Europe today either...
@MikaelEriksson I think your solution is sound and much nicer than the direction I was heading. Ironically this query started off as a TOP and when the new requirements came I had it in my mind that I needed to page instead. Yesterday when I was updating my progress I realized that I couldn't filter just on time because the time stamp isn't required to be unique across users. As such I think I need to have the KEY be the input to the stored procedure and filter off the key's row number
An explanation of that edge case is at the very bottom of my very long question. I'm happy to accept your solution and then post another question if I have trouble converting the query to use row number/key if you think that is the most appropriate. When I posted the question I didn't realize/think about the edge case that will cause filtering by time buggy.
Ugh, the devs on this project are bad at databases. This is a table for warehouse inventory: CREATE TABLE [dbo].[BDIVTRAN]( [VVTDLT] [char](1) NOT NULL DEFAULT (''), [VVTCO#] [numeric](2, 0) NOT NULL DEFAULT ((0)), [VVTWH#] [numeric](2, 0) NOT NULL DEFAULT ((0)), [VVTYMD] [numeric](8, 0) NOT NULL DEFAULT ((0)), [VVTRF1] [char](25) NOT NULL DEFAULT (''), [VVTRF2] [char](25) NOT NULL DEFAULT (''), [VVTTXN] [char](20) NOT NULL DEFAULT (''), [VVTPC] [numeric](6, 0) NOT NULL DEFAULT ((0)), [VVTQTY] [numeric](9, 0) NOT NULL DEFAULT ((0)),
The char(25) are names of varying lengths. They have # in their column names.
And then when I looked at the data, it contains inventory snapshot data as well as transactions, denoted by the VVTTXN column.
What is the policy on dupes (and de facto dupes)? I think pointing towards a definitive answer for FAQs is a good idea - how do we discourage repeat answers? Downvote the dupe? Upvote the original? Both? Neither? Check here and here.
@Vérace I looked at that example long and hard earlier and failed to come to a firm conclusion.
Upvote good questions and answers. Downvote poor ones. Dupe-ness isn't really a factor, unless you're thinking about a basic failure to search for a very common question. Once a question is closed as a duplicate, no more answers can be added. In the case of the target, a 15K user or mod can protect it. Ultimately, it can even be locked. A me-too copy answer added long after the original can be flagged.
In some cases the newer question has the better answer. Personally, I don't have a big problem with closing the earlier question as a dupe of the latter, but I can see why people might think that's weird.
For exact dupes, I will merge if it makes sense to do so, and no one loses out too badly.
If the new question is a better question or has better answers, then vote to close the old one as a duplicate of the new one.
You can flag and ask a moderator to merge after closure if they're exactly the same.
If they differ based on the versions of the relevant systems, then they're not real...
What should I do when I see a question that is a duplicate of another one?
Should I answer it?
Should I downvote it?
Should I comment?
Should I edit the question to indicate it's a duplicate?
Should I tag the question with the duplicate tag?
If I can, should I (vote to) close the question?
@PaulWhite And the answer deserves "epic" votes - but it does beg the question as to why the original answer wasn't improved (point harvesting?). I'm trying to go over my old answers and edit them rather than re-posting answers of yore!
I stopped myself from leaving a comment asking what the point was of testing something that's going to run on Oracle on a different database with different syntax rules and different performance characteristics (and possibly different semantics).
@JamesLupolt My understanding is that the initial implementation targeted parallel only because: columnstore -> large data -> parallelism. Adding serial batch mode was based on user feedback on real-world usage.
If I understand the request correctly, the goal is to delete batches of rows, while at the same time, DML operations are occurring on rows throughout the table. The goal is to delete a batch; however, if any underlying rows contained within the range defined by said batch are locked, then we must...
@swasheck If you think it was offensive then please flag and remove it. I meant it as a silly reference to a silly old movie. Which is the way I think @mmarie took it. I wasn't trying to be derogatory/judgmental/<insert negative intent>
@Erik Do not worry about that post. One thing that comes to my attention from your kind comments in there is when you mention that you can't follow the notation and / or concepts fully. In this regard, I think that I could enhance my writing style or provide some more sources in order to make my answers more approachable. I would really apreciate your feedback on that aspect. =)
@Erik It's just great that you come here and take the time to share your knowledge and talent with the community. Testing is not my favourite ambit, either, ha ha ha; but if it has to be done, it has to be done in the best possible way, 'tough I don't have much experience in this respect.
@MDCCL I'll think about that and get back to you with a more refined answer. Right now the best I can do is a crummy math analogy. I think math wonks can express themselves using notation that is perfect for expressing their ideas, but it is incomprehensible to laymen.
Invariably I'm able to understand the essence of your answer (I think), but there are times when I think I lose some of the details/nuances. I'm sure I could pick them up if I really needed the information in the answer though. Does that make sense and/or help?
@Erik Sure, It makes sense and is helpful too, thank you. I get what you mean, and in this regard, one of the intentions I have when droping that kind of concepts (that could seem unpurposely pedantic) is that, when used in the apropriate context, it can motivate seekers who are not familiar with such concepts to search for papers/books/resources of value, hopefully it has worked some times :)
@Erik Reading and re-reading, and... relational theory has been extremely helpful for me, so I consider it can be useful for other data/programming professionals, as well.
@Erik I'm planning to engage on some kind of experimental/sample personal system. I have worked mostly with ASP.NET since some time ago, but I am considering some alternatives. I have never completely liked Membership nor Simple Membership.
@Erik I will document myself on ASP.NET Identity and perharps will ask for your opinions on the future, if you are OK with it, of course. Maybe posting some questions on StackOverflow could be nice, so that I can offer extra motivation.
i'd go with "... shouldn't be so concerned" because you still need to exercise a good deal of judgment when sifting through suggested/missing indexes. that missing index suggestion doesn't take your whole workload into consideration - even if it is part of your regular workload. — swasheck1 min ago