I posted many questions but most of the questions are put on hold as off-topic or duplicate or closed i dont know reason may be my english how to explain my issues or otherwise some senior stackusers dominate me?
How to handle a senior staff always fight with all staff in a government office? [...
I have made a pie chart that display the percentage of expenses, but the percentage not that clear to read. how can i make them displayed in a clear way?
@M.A.R. oh, my keyboard got tons of hair, no idea how. It's far from my head, I have short hair, and I don't see my hair ever falling. Still, every time I clean the keyboard, I get hairballs out of it. o_O
Bring Kenny to the Tavern, I'm sure he'll enjoy it. :D
It's not the view, it's the filter. Select * From ViewName works, but when adding Where FieldName='value' All goes to hell and it just times out. @rene any idea how such thing can happen? :(
It's just a field in one of the tables the view selects from.
@rene hmm.... top 100 times out too (I abort after a minute, the actual code has 30 seconds timeout), but top 1 worked fast. Top 2 was slower, etc. So with every record it selects it becomes much slower. So weird. :(
it is a job that normally runs once a day or so and keeps some stats about tables and indexes. If it has outdated values because it wasn't run for a while it chooses the wrong execution plan
@rene Well, just adding WITH SCHEMABINDING to everything (main view and all the functions/sub views it's using) solved the problem, no longer times out. Thanks!!
Guess it's still horrible and can be improved by like 90%, but meh... will probably take me long hours to put a "real" fix.