Viewing 15 posts - 91 through 105 (of 312 total)
J Livingston SQL (5/8/2015)
New Born DBA (5/6/2015)
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 8, 2015 at 10:33 am
Long story short is that the clustered index on C1 column cannot be dropped. I was going to suggest maybe using C1 column in where clause, but I don't think...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 8, 2015 at 9:30 am
Lynn Pettis (5/7/2015)
New Born DBA (5/7/2015)
Sorry, but I actually spit soda out my nose on this comment:
Well I hope you are OK. 😀
It isn't a system field, the column c1is...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 7, 2015 at 9:20 am
Sorry, but I actually spit soda out my nose on this comment:
Well I hope you are OK. 😀
It isn't a system field, the column c1is a user defined column on...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 7, 2015 at 9:07 am
New Born DBA (5/6/2015)
My suggestion, if most of your SELECT queries read on column C6, is to change the primary key from a CLUSTERED index to a NONCLUSTERED index and...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 7, 2015 at 8:45 am
My suggestion, if most of your SELECT queries read on column C6, is to change the primary key from a CLUSTERED index to a NONCLUSTERED index and then make the...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 12:38 pm
So COL_CORE_Audit_Data is a view? Need to see the DDL for the view and the underlying tables and the indexes on the tables.
Index 1:CREATE NONCLUSTERED INDEX [I387_6_1] ON [dbo].[T387]
(
[C6]...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 11:54 am
So COL_CORE_Audit_Data is a view? Need to see the DDL for the view and the underlying tables and the indexes on the tables.
Table:
CREATE TABLE [dbo].[T387](
[C1] [nvarchar](15) NOT NULL,
[C2] [nvarchar](254) NULL,
[C3]...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 11:51 am
Lynn Pettis (5/6/2015)
New Born DBA (5/6/2015)
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 11:09 am
See the issue is that I don't even know why SQL Server uses this Index? This Index is useless in this situation because column C1 is ID column which is...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 11:01 am
New Born DBA (5/6/2015)
Query returns all data modified in the past 31 days.
Without seeing the indexes defined on the table, not much more can be done.
Index Info.
/****** Object: Index...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 10:29 am
Query returns all data modified in the past 31 days.
Without seeing the indexes defined on the table, not much more can be done.
Well the thing is this query uses this...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 10:29 am
J Livingston SQL (5/6/2015)the last 31 days...?????
Yes
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 10:25 am
New Born DBA (5/6/2015)
Lynn Pettis (5/6/2015)
Looks like you are storing date information as seconds since midnight 1970-01-01, correct?
Yes, that is correct.
So, what is the where clause attempting to filter?
Sorry, but...
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 10:24 am
Lynn Pettis (5/6/2015)
Looks like you are storing date information as seconds since midnight 1970-01-01, correct?
Yes, that is correct.
So, what is the where clause attempting to filter?
Sorry, but I don't know.
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
May 6, 2015 at 10:05 am
Viewing 15 posts - 91 through 105 (of 312 total)