Viewing 15 posts - 18,451 through 18,465 (of 22,226 total)
GilaMonster (2/10/2009)
tran008 (2/10/2009)
so if I put the order by in the view...both select statement in general perform the same?
If you put just an order by one a select in...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 8:25 am
Without knowing precisely what's in the view, I couldn't say. But let's take this:
--view definition
CREATE VIEW dbo.View1
AS
SELECT t1.col1
,t1.col2
,t1.col3
FROM dbo.table1 t1;
GO
--select from...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 7:55 am
It's going to be very difficult to answer the questions with any degree of authority without seeing the structures, sample data & queries run against it.
Shailesh Gajare (2/9/2009)
Doubts?
...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 7:43 am
It depends on how much control you have over the inserts. If all calls to your tables are through stored procedures, just add a second insert to the procedure so...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 7:33 am
The two aren't equal. You would need to include the ORDER by in the select from the view.
A view is just a select statement. Nothing magic.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 7:31 am
This won't help you now, but another option available is to collect, and aggregate over time, the procedure calls by running a very lean server-side trace to capture queries run...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 10, 2009 at 7:27 am
Jeff Moden (2/6/2009)
Grant Fritchey (2/6/2009)
tosscrosby (2/6/2009)
Not the BEST bounty hunter in the galaxy - was it a mutual agreement sort of thing? (now we're really getting wierd)Union.
Heh... ok... now I'm...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 8, 2009 at 4:13 am
tosscrosby (2/6/2009)
Not the BEST bounty hunter in the galaxy - was it a mutual agreement sort of thing? (now we're really getting wierd)
Union.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 12:58 pm
I've given up Boba Fett, so he's available.... which sounds weird.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 12:30 pm
Completely no help to you, this is a great example of how the estimated costs and the actual costs have nothing to do with each other. Jeff would love it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 11:57 am
Looking at it some more, you're query is joining between tables with this:
JOIN dbo.Citizenships AS C
...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 11:55 am
That's a strange one. The estimated & actual rows are WAY off. You might check the statistics. Let me keep looking.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 11:47 am
TheSQLGuru (2/6/2009)
I have seen this for massively partitioned tables as well.
Really. When did it occur? When the query had to hit lots of the partitions or is it just a...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 11:20 am
Oh no, if it's going to bug the apps, then clearly the data is not guaranteed unique. I'm just saying if the data is going to be unique, there's no...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 9:08 am
Lynn Pettis (2/6/2009)
Grant Fritchey (2/6/2009)
I forgot, swabbie, deck ape, blue jacket, airedale, a-ganger (nasty job).
The more you remind me of what my brother said about the Navy, the more I'm...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 6, 2009 at 8:13 am
Viewing 15 posts - 18,451 through 18,465 (of 22,226 total)