in Education by
How would make a news feed "friendly" database design, so that it wouldn't be extremely expensive to get all of the items (query) to put in the news feed? The only way I can think of would involve UNIONing nearly every table (representing groups, notes, friends, etc) and getting the dates and such, that just seems like it'd be a really expensive query to run for each user, and it'd be pretty hard to cache something like that with everyone's being different. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Firstly, consider doing a performance prototype to check your hunch that the union would be too expensive. You may be prematurely optimisizing something that is not an issue. If it is a real issue, consider a table designed purely to hold the event feed data, that must be updated in parallel with the other tables. E.g. when you create a Note record, also create an event record in the Event table with the date, description, and user involved. Consider an indexing the Event table based on UserId (or UserId and Date). Also consider clearing old data when it is no longer required. This isn't a normalised schema, but it may be faster if getting an event feed is a frequent operation.

Related questions

0 votes
    As of SQL Server 2005, you used to be able to open a flat file in SQL Management Studio off the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 7, 2022 in Education by JackTerrance
0 votes
    As of SQL Server 2005, you used to be able to open a flat file in SQL Management Studio off the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 6, 2022 in Education by JackTerrance
0 votes
    have a table of the list of problems people can have. These people are id'd by a number. These ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    have a table of the list of problems people can have. These people are id'd by a number. These ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    After reading the chapter, I know these points: I know that data gets highlighted after being selected. I know ... entry and editing. Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    Match the ministry with the news that the ministry may have released A B a) A new policy is being made to increase ... ii v iii iv i Select the correct answer from above options...
asked Aug 3, 2022 in Education by JackTerrance
0 votes
    I need to add class to News item if Relations tab has a video element. preview image My question ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    In a hostel, 60% of the students read Hindi news paper, 40% read English news paper and 20% read both Hindi ... reads Hindi news paper. Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    Forecasts about which weather related factors are given during the news bulletins on Doordarshan and ... proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    Before starting to enter data in a table, you must create the: a. Design of the table c. Database from which to ... d. All of these Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Which normal form is considered adequate for normal relational database design? (a) 2NF (b) 5NF (c) ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Which normal form is considered adequate for normal relational database design? (a) 2NF (b) 5NF (c) ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Which is a bottom-up approach to database design that design by examining the relationship between attributes ... Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    The database design that consists of multiple tables that are linked together through matching data stored in ... Hashing in division Indexing and Hashing of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    Which is a bottom-up approach to database design that design by examining the relationship between attributes: ... upon Normal Forms in portion Normalization of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
...