Hi, I have this query going like this: select * from ( select id, row_number()over(partition by fk_tbl_visits_id order by id desc) as rn...
Hi, I have a log table that saves web visits. And I have this query which is pretty slow : select top 500 count(1) as nbCount, currentPage as...
Hi, I keep wondering what's the best way to create a clustered index. I tried many ways. Some make the query fast even though I think it could be...
Hi, Let's say I have a customer table and an order table. In the order table, I have the customer name. So if I want to select the orders grouped by...
Hi, I have a table logging our website activity with about 60 M of rows. One user has for itself more than 1 M rows. When I do a count(distinct), it...
Hi, I'm trying to build my own web stats tool like Google Analytics. And like them, I'd like to implement a drill down function to segment data on...
Hi, I have a table with 100 M+ rows. As the table grows, the select queries are getting slower. In the execution plan, everything looks fine since...
Separate names with a comma.