Why does the DB contain two identical tables?
Started by smankusors
Why does the DB contain two identical tables? 03 May 2016, 21:56 |
Registered: 7 years ago Posts: 16 |
I lost my computer, and I lost my data usage too. Fortunately I have a backup, and I'm planning to simulate the data usage.
But I found something that I don't understand...
Why the DB contains "total_usage" and "total_usage_with_status"? Why not just... merge them? What is the meaning of "status" column?
Thanks,
Antony Kurniawan
Re: Why does the DB contain two identical tables? 03 May 2016, 23:45 |
Admin Registered: 18 years ago Posts: 3 519 |
The reason there are two is that total_usage is executed faster than total_usage_with_status where NetWorx only fetches the total usage and doesn't need the status.
The status is the 'hour status' assigned by the user to that hour in the Advanced Settings:
- Peak hour, when traffic is classed as on-peak.
- Non-peak hour, when traffic is classed as off-peak.
- Ignored hour, when traffic is disregarded.
Re: Why does the DB contain two identical tables? 04 May 2016, 01:57 |
Registered: 7 years ago Posts: 16 |
Re: Why does the DB contain two identical tables? 04 May 2016, 12:16 |
Admin Registered: 18 years ago Posts: 3 519 |
INSERT OR REPLACE INTO usage (USER_NAME, DAY, HOUR, DATA_IN, DATA_OUT, DIALUP_DURATION) VALUES ('John Smith', cast(julianday('2016-04-27')-julianday('1899-12-30') as integer), 0, 322122547200, 0, 0);
Re: Why does the DB contain two identical tables? 04 May 2016, 15:44 |
Registered: 7 years ago Posts: 16 |
Re: Why does the DB contain two identical tables? 04 May 2016, 15:49 |
Admin Registered: 18 years ago Posts: 3 519 |
Re: Why does the DB contain two identical tables? 04 May 2016, 15:53 |
Registered: 7 years ago Posts: 16 |
Re: Why does the DB contain two identical tables? 05 May 2016, 03:37 |
Registered: 7 years ago Posts: 16 |
Re: Why does the DB contain two identical tables? 05 May 2016, 10:11 |
Admin Registered: 18 years ago Posts: 3 519 |
Re: Why does the DB contain two identical tables? 05 May 2016, 15:38 |
Registered: 7 years ago Posts: 16 |
Re: Why does the DB contain two identical tables? 05 May 2016, 19:35 |
Admin Registered: 18 years ago Posts: 3 519 |
Re: Why does the DB contain two identical tables? 09 May 2016, 03:06 |
Registered: 7 years ago Posts: 16 |