I am trying to extract an application log file from a single table. Query request output is quite simple.
select top 200000 * from dbo.transactionlog where rowid>7 and rowid <700000 and Project='AmWINS'
The request time for selection is above 5 minutes. Is it considered for a long time? While making a selection, bulk insert is performed.
[EDIT]
In fact, I had a serious problem with my current production database. Basically, we only have one table (transaction log). the entire application log will be inserted into this table. For a project like AmWINS, based on the counting results, we have about 800K ++ records inserted per day. Insert recording is performed 24 hours a day in a production environment. The user would like to extract data from the table if the user wants to check the transaction logs. Therefore, we need to select entries from the table, if necessary.
I tried to simulate the UAT environment in order to pump it in volume according to the production, which is still growing up to 10 million records. and while I am trying to extract the records, at the same time I am simulating a volume insert so that it looks like in a production environment. It took only 5 minutes to extract 200 thousand records.
During the extraction, I observe on the phyiscal server the SQL server, which reaches a maximum of 95%.
The tables have 13 fields and the identifier is included (rowid) with bigint. rowid is a PC. Indexes are created by date, project, module and RefNumber number. tables are created in rowlock and pagelock. I am using SQL Server 2005.
Hope you guys can give me some professional advice to enlighten me. Thanks.
beginner
source share