We've got 2.5M rows in the icUrlTracker table and some queries are upwards of 3 seconds:
RowNumber DatabaseName
Duration
CPU TextData
784
Umbraco 2751
1309 SELECT * FROM icUrlTracker WHERE Is404
= 0 AND RedirectRootNodeId = @redirectRootNodeId AND OldRegex IS NOT NULL ORDER
BY Inserted DESC
Would it be advisable to put another index on this table for the fields being queried?
And see what it suggests for the icUrlTracker table. I think adding a index on columns Is404, RederictRootNodeId, OldRegex and inserted can do the trick.
Thanks for reporting this. At the moment I'm working on performance of the UrlTracker, as far as I've got any time to work on the UrlTracker ;-)
Someone submitted a pull request to create an index for performance reasons.
Could you execute the following SQL query to add this index, measure the same SQL queries which took 3 seconds and report your findings here?
Thanks in advance!
SQL query:
IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'icUrlTracker')
BEGIN
CREATE NONCLUSTERED INDEX [IX_icUrlTracker] ON [icUrlTracker]
(
[ForceRedirect] ASC,
[Is404] ASC,
[RedirectRootNodeId] ASC
)
INCLUDE ( [Id],
[OldUrl],
[OldUrlQueryString],
[OldRegex],
[RedirectNodeId],
[RedirectUrl],
[RedirectHttpCode],
[RedirectPassThroughQueryString],
[Notes],
[Referrer],
[Inserted]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
END
Performance with large dataset
We've got 2.5M rows in the icUrlTracker table and some queries are upwards of 3 seconds:
RowNumber DatabaseName Duration CPU TextData
784 Umbraco 2751 1309 SELECT * FROM icUrlTracker WHERE Is404 = 0 AND RedirectRootNodeId = @redirectRootNodeId AND OldRegex IS NOT NULL ORDER BY Inserted DESC
Would it be advisable to put another index on this table for the fields being queried?
thanks
Matt
Hey,
Maybe you can run this script : http://blog.sqlauthority.com/2011/01/03/sql-server-2008-missing-index-script-download/
And see what it suggests for the icUrlTracker table. I think adding a index on columns Is404, RederictRootNodeId, OldRegex and inserted can do the trick.
Hi Matt,
Thanks for reporting this. At the moment I'm working on performance of the UrlTracker, as far as I've got any time to work on the UrlTracker ;-)
Someone submitted a pull request to create an index for performance reasons.
Could you execute the following SQL query to add this index, measure the same SQL queries which took 3 seconds and report your findings here?
Thanks in advance!
SQL query:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.