471,330 Members | 1,041 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Re: Linq Group by whole day

I hadn't yet needed to do this, but I'm kinda glad it works! Shame about
all those DATEADDs though... I've just run a test, and a

CAST(FLOOR(CAST(x as float)) as datetime)

is twice as quick... 2594ms [1310ms] vs 4579ms [2295ms]
(total-CPU-time [elapsed-time], based on 3773567 rows with a
non-clustered index on the time column, having pre-fetched the data
[logical reads], on a multi-core server).

OK, yes it is a blatant abuse of knowing the data-structure, but should
be fine for LINQ-to-SQL at least ;-p

I might drop a message on the LINQ General forum...

Jun 27 '08 #1
0 942

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Marc Gravell | last post: by
4 posts views Thread by shapper | last post: by
1 post views Thread by Tem | last post: by
22 posts views Thread by paululvinius | last post: by
8 posts views Thread by Alcides | last post: by
9 posts views Thread by =?Utf-8?B?cmF1bGF2aQ==?= | last post: by
14 posts views Thread by thj | last post: by
21 posts views Thread by hrishy | last post: by
2 posts views Thread by shapper | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.