Skip to main content
12 events
when toggle format what by license comment
May 8, 2018 at 21:04 answer added Grzegorz Łyp timeline score: 0
May 24, 2016 at 23:07 comment added Michael Z. Sounds like an index problem. If you can't use views where the table's index still applies then try the index in the function like the answer shows or select from your function into a temp table and create the index on the temp table.
May 24, 2016 at 22:18 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apr 18, 2016 at 16:27 history edited Paul White CC BY-SA 3.0
Incorporated comments
Mar 17, 2015 at 23:09 answer added Daniel Hutmacher timeline score: 2
Mar 17, 2015 at 17:45 comment added Jweaver what format is the best way to show the exection plan here
Mar 17, 2015 at 17:35 comment added Aaron Bertrand Post some actual, post-execution plans, please. Much easier to inspect those than try to reverse engineer "runs slower" and "runs quickly again."
Mar 17, 2015 at 17:04 comment added a1ex07 @Jweaver: You need to check actual execution plan in each case to get an exact answer. I'd guess having WHERE on low cardinality column (such as bit or varchar2) makes impossible to use index even if it exists. Quite opposite with datetime column which I expect to have way higher cardinality. Even without index SQLServer may have statistics on this column which causes choosing much better and faster execution plan.
Mar 17, 2015 at 16:57 comment added ypercubeᵀᴹ The optimizer can choose a very different plan, especially when you are joining like 10+ tables. Different can mean faster or slower. Without the actual functions, the underlying tables structure, indexes, statistics and the actual execution plans, I think you'll only get guesses, not answers.
Mar 17, 2015 at 16:44 history edited ypercubeᵀᴹ CC BY-SA 3.0
edited tags
Mar 17, 2015 at 16:43 review First posts
Mar 17, 2015 at 18:40
Mar 17, 2015 at 16:41 history asked Jweaver CC BY-SA 3.0