A database design related to traffic statistics and an ISQLPLUS Setting Problem

Source: Internet
Author: User
In larger blogs and news systems, statistics are often made, such as daily visits, 48-hour visits, and weekly visits. Are these access data collected in real time? In terms of daily access traffic, should all traffic be cleared according to rules such as every night? If there are 1 million records to be cleared, do you perform group operations? During the operation, the data obtained by the user's access ranking or other items will have an error (for example, the first few records are cleared, and the back data is not cleared ), this is undoubtedly not a good solution. Another solution is to record each access log and rank the data in real time. The advantage of this is that it is real-time, however, a huge log table is required, and the time consumed by calculation will also result in a loss of the candle. Is there a better way? Here, we provide a design concept, which can solve the problem of real-time statistics and avoiding big data table support and batch update. The design is as follows:
For example, in a system's article table, we can design an integer type of daily access field and weekly access field, and an xmltype to record daily access and date, another important setting is to set a recent access time field of the date type. This field is useful and can be used to compare with the current date, when a user accesses a record, if the last access time is not today, a series of update operations should be performed on the record: Save the daily access data to the daily access table, based on the recent access time, we can determine the actual day-to-day access volume. At the same time, we can update the weekly access volume data based on the daily access volume data. Then, we can clear the daily access volume and 1 to indicate that today's access volume is 1, the last access time is updated to the current date, so that it is OK (the first person who accesses the record on the day is working hard). For other people who visit the record on the day, you only need to update the daily and weekly visits.
The biggest advantage of this is the convenience of ranking statistics. For example, when ranking daily visits, the selected records are only those records with the last access date on the current date, this does not cause a series of data inconsistencies during batch update operations. The same is true for weekly visits. This design idea is only proposed at the design stage. It remains to be tested by practical applications.
In addition, when ISQLPLUS is used for backup, the user name and password of the server operating system must be entered. However, if the user name and password of the server operating system are entered correctly, a Password error is prompted, I thought it should be a Web-based access permission problem. I checked it online. If so, I need to add a batch update permission for the system users. The operation is as follows:
Start> Administrative Tools> Local Security Policies> Local Policies> User permission assignment> Batch Job logon> double-click to add an operating system user (Administrator)
In fact, this is also seen in an article in the blog Garden. The garden has rich resources.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.