G
I have a log file with about 180K records.
I'm looking to create a ranking of most frequently visited pages.
This is the query I'm currently using:
Select top 10 * from
( SELECT HitPage, URL, count(HitPage) as f1, PageTitle from
tblSession
where LogDate >=39142
GROUP BY HitPage, url, PageTitle ) order by f1 desc
I have tried indexes on:
LogDate, HitPage, URL, PageTItle
HitPage, URL, PageTitle, LogDate
When the LogDate is less than a month ago, its very quick, but when
looking at a year's worth of data is very slow
Any advice would be appreciated!
I'm looking to create a ranking of most frequently visited pages.
This is the query I'm currently using:
Select top 10 * from
( SELECT HitPage, URL, count(HitPage) as f1, PageTitle from
tblSession
where LogDate >=39142
GROUP BY HitPage, url, PageTitle ) order by f1 desc
I have tried indexes on:
LogDate, HitPage, URL, PageTItle
HitPage, URL, PageTitle, LogDate
When the LogDate is less than a month ago, its very quick, but when
looking at a year's worth of data is very slow
Any advice would be appreciated!