Recording user activties in a SQL table - an unwieldy amount of data?
up vote
1
down vote
favorite
I've got an online application and I want to record key user events, such as when a user logged in, logged out, viewed certain record. For each of these interactions I can easily add a new row to a sql table with the user ID, event and timestamp, but won't I end up with an excessively large table pretty quickly?
EG - 100,000 users, 10 logs per session on average - that's a million rows already? Is this a problem? Am I worried about nothing?
I know that SQL databases can hold almost unlimited amounts of data, but the problem comes from when you then want to manipulate the data, and the time it takes. If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
php sql
add a comment |
up vote
1
down vote
favorite
I've got an online application and I want to record key user events, such as when a user logged in, logged out, viewed certain record. For each of these interactions I can easily add a new row to a sql table with the user ID, event and timestamp, but won't I end up with an excessively large table pretty quickly?
EG - 100,000 users, 10 logs per session on average - that's a million rows already? Is this a problem? Am I worried about nothing?
I know that SQL databases can hold almost unlimited amounts of data, but the problem comes from when you then want to manipulate the data, and the time it takes. If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
php sql
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've got an online application and I want to record key user events, such as when a user logged in, logged out, viewed certain record. For each of these interactions I can easily add a new row to a sql table with the user ID, event and timestamp, but won't I end up with an excessively large table pretty quickly?
EG - 100,000 users, 10 logs per session on average - that's a million rows already? Is this a problem? Am I worried about nothing?
I know that SQL databases can hold almost unlimited amounts of data, but the problem comes from when you then want to manipulate the data, and the time it takes. If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
php sql
I've got an online application and I want to record key user events, such as when a user logged in, logged out, viewed certain record. For each of these interactions I can easily add a new row to a sql table with the user ID, event and timestamp, but won't I end up with an excessively large table pretty quickly?
EG - 100,000 users, 10 logs per session on average - that's a million rows already? Is this a problem? Am I worried about nothing?
I know that SQL databases can hold almost unlimited amounts of data, but the problem comes from when you then want to manipulate the data, and the time it takes. If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
php sql
php sql
asked Nov 21 at 20:31
PHPNewbie
111
111
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
up vote
1
down vote
Assuming you get 100.000 users per month, that's going to be what, a couple of megabytes of storage? My phone takes photos larger than that.
Just do the simplest thing that works at first. If it's inserting records in a database, do that.
add a comment |
up vote
0
down vote
Find out for yourself - whats data you are realy need?
- I think it some summary data
So, every day run some cron script witch will be summarize needful data about an user to an another table with more less data length.
After calculating an necessary data delete unuseful rows from an original table.
add a comment |
up vote
0
down vote
If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
Databases support indexes for exactly this type of operation. So, if you design your database properly, you will not see poor performance.
add a comment |
up vote
0
down vote
For really basic data stream collection, any SQL database will work, but you will eventually want to look at something more aligned to this type of data. For this type of time-series data, a streaming DB type might be more appropriate:
- RethinkDB
- Apache Kafka
- Amazon Kinesis
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Assuming you get 100.000 users per month, that's going to be what, a couple of megabytes of storage? My phone takes photos larger than that.
Just do the simplest thing that works at first. If it's inserting records in a database, do that.
add a comment |
up vote
1
down vote
Assuming you get 100.000 users per month, that's going to be what, a couple of megabytes of storage? My phone takes photos larger than that.
Just do the simplest thing that works at first. If it's inserting records in a database, do that.
add a comment |
up vote
1
down vote
up vote
1
down vote
Assuming you get 100.000 users per month, that's going to be what, a couple of megabytes of storage? My phone takes photos larger than that.
Just do the simplest thing that works at first. If it's inserting records in a database, do that.
Assuming you get 100.000 users per month, that's going to be what, a couple of megabytes of storage? My phone takes photos larger than that.
Just do the simplest thing that works at first. If it's inserting records in a database, do that.
answered Nov 21 at 20:41
Joni
75.4k996148
75.4k996148
add a comment |
add a comment |
up vote
0
down vote
Find out for yourself - whats data you are realy need?
- I think it some summary data
So, every day run some cron script witch will be summarize needful data about an user to an another table with more less data length.
After calculating an necessary data delete unuseful rows from an original table.
add a comment |
up vote
0
down vote
Find out for yourself - whats data you are realy need?
- I think it some summary data
So, every day run some cron script witch will be summarize needful data about an user to an another table with more less data length.
After calculating an necessary data delete unuseful rows from an original table.
add a comment |
up vote
0
down vote
up vote
0
down vote
Find out for yourself - whats data you are realy need?
- I think it some summary data
So, every day run some cron script witch will be summarize needful data about an user to an another table with more less data length.
After calculating an necessary data delete unuseful rows from an original table.
Find out for yourself - whats data you are realy need?
- I think it some summary data
So, every day run some cron script witch will be summarize needful data about an user to an another table with more less data length.
After calculating an necessary data delete unuseful rows from an original table.
answered Nov 21 at 20:45
Николай Лубышев
40337
40337
add a comment |
add a comment |
up vote
0
down vote
If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
Databases support indexes for exactly this type of operation. So, if you design your database properly, you will not see poor performance.
add a comment |
up vote
0
down vote
If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
Databases support indexes for exactly this type of operation. So, if you design your database properly, you will not see poor performance.
add a comment |
up vote
0
down vote
up vote
0
down vote
If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
Databases support indexes for exactly this type of operation. So, if you design your database properly, you will not see poor performance.
If I had a table of 400 million rows, and wanted to quickly extract those relevant to a specific user, I imagine I'd start seeing slow loadtimes.
Databases support indexes for exactly this type of operation. So, if you design your database properly, you will not see poor performance.
answered Nov 21 at 22:43
Gordon Linoff
749k34285391
749k34285391
add a comment |
add a comment |
up vote
0
down vote
For really basic data stream collection, any SQL database will work, but you will eventually want to look at something more aligned to this type of data. For this type of time-series data, a streaming DB type might be more appropriate:
- RethinkDB
- Apache Kafka
- Amazon Kinesis
add a comment |
up vote
0
down vote
For really basic data stream collection, any SQL database will work, but you will eventually want to look at something more aligned to this type of data. For this type of time-series data, a streaming DB type might be more appropriate:
- RethinkDB
- Apache Kafka
- Amazon Kinesis
add a comment |
up vote
0
down vote
up vote
0
down vote
For really basic data stream collection, any SQL database will work, but you will eventually want to look at something more aligned to this type of data. For this type of time-series data, a streaming DB type might be more appropriate:
- RethinkDB
- Apache Kafka
- Amazon Kinesis
For really basic data stream collection, any SQL database will work, but you will eventually want to look at something more aligned to this type of data. For this type of time-series data, a streaming DB type might be more appropriate:
- RethinkDB
- Apache Kafka
- Amazon Kinesis
answered Nov 21 at 23:45
Dan Gayle
1,4781631
1,4781631
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420049%2frecording-user-activties-in-a-sql-table-an-unwieldy-amount-of-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown