Friday, March 9, 2012

Performance

hi,
my query
Select A.COL1,B.COL1 from
A,B
where convert(varchar(8),A.COL3,108)= convert(varchar(8),B.COL3,108)
provided COL3 is part of the key in both the tables.
So if we try to convert the index of the table to time alone the performance
of the query is affected and it's taking a longer time to execute...
how to solve this?
thanks
vanithaTo add to John's , I think you are going to run into a wrong approach
Why would you want to JOIN these tables ON time column ? Would ut be better
much to add Primary key and Foreing Keu and then to JOIN them . You will be
able to add a WHERE clause for TIME columns as John suggested to store
separately.
"vanitha" <vanitha@.discussions.microsoft.com> wrote in message
news:908FCB48-56DD-4A57-A348-8A0419B48E35@.microsoft.com...
> hi,
> my query
> Select A.COL1,B.COL1 from
> A,B
> where convert(varchar(8),A.COL3,108)= convert(varchar(8),B.COL3,108)
> provided COL3 is part of the key in both the tables.
> So if we try to convert the index of the table to time alone the
> performance
> of the query is affected and it's taking a longer time to execute...
> how to solve this?
> thanks
> vanitha
>

No comments:

Post a Comment