May 11, 2023 at 4:26 pm
so code is just a view on top of this table, that does select * from this table without any filter.
May 11, 2023 at 5:22 pm
so code is just a view on top of this table, that does select * from this table without any filter.
Ok, so the code that's causing the performance problem is actually in the view.
What we have from you, so far, is you saying that your car is having issues when you go up hill and can't reach highway speeds even on a flat. You've shown us the spoiler on the back of the car, the nice tires, and the fuzzy dice hanging from the mirror. But, we can't pop the hood on the vehicle to check for you so you need to provide some measurements and tell us what kind of gas, oil, and transmission fluid you're using, as well as what their levels are. 😀
To do that, I strongly recommend that you read and heed the article at the second link in my signature line for one of the better ways to post a performance issue so that you have a much better chance of resolving this issue.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 12, 2023 at 4:10 pm
Thanks. Question is do you really have room for improvement, when you your table is large as 176M rows and your view on top of that table returns everything without filter.
May 12, 2023 at 5:25 pm
SQL can usually imbed the conditions into the query plan to access the table rather than scanning the entire table first. Of course you'd have to look at the query plan to be sure.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 12, 2023 at 6:31 pm
Thanks. Question is do you really have room for improvement, when you your table is large as 176M rows and your view on top of that table returns everything without filter.
First is view literally just a SELECT * from a single table or is it actually doing any other work?
Second usually doing a SELECT * with no filter from a massive table will not be great performance, why is it not being filtered in some way(either in the view itself or wherever the view is accessed)? As scott noted SQL Server will try to push down where clause filters done on the view to the base tables if it can.
May 13, 2023 at 10:42 am
This was removed by the editor as SPAM
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply