Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
prakashram
Starting Member
4 Posts |
Posted - 2006-11-14 : 05:17:05
|
| Hi Friends,I have two large tables like auditTbl, CntTbl which has around 30 lacks records.auditTbl - CntId, UsrId, DateAccess, CntTbl - CntId, CntCatei want to get number of access for each user with each content.I have writen query but it's taking more time to execute bec of large data in both table.How can i overcome this problem? Please give the solution to handle this problem |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-11-14 : 05:19:22
|
Please post your table DDL and your query. Also indicate what are the indexes you have on these 2 tables. KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-14 : 05:24:52
|
Select UsrID, CntID, Count(DateAccess)from auditTbl a Join CntTbl con a.CntId = c.CntIdGroup by UsrID, CntID ???Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-14 : 05:51:21
|
| Which indexes do you have on your 3 million record table?Peter LarssonHelsingborg, Sweden |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-14 : 08:46:56
|
quote: Originally posted by prakashram Hi Friends,I have two large tables like auditTbl, CntTbl which has around 30 lacks records.auditTbl - CntId, UsrId, DateAccess, CntTbl - CntId, CntCatei want to get number of access for each user with each content.I have writen query but it's taking more time to execute bec of large data in both table.How can i overcome this problem? Please give the solution to handle this problem
Post the query you used. Also post table structuresMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|