Hi to all,
Im still a newbie in cr10, Im making a report from my database using vb6 as it's front end. I have a question regarding filters in CR10 since in data environment as we know we can do this dte1.rsCmd.Filter or
dte1.rsCmd.Requery
How do i do this in CR10? I have a customized filters ( a series of cbo boxes to filter search in database) in my form..
Any help is welcome guys. I really need help
Thanks in advance!Hi again,
I hope i stated my question clear. Im looking for a way to filter my database by using the vb6 cbo boxes and printing it using crystal report 10.. Im using MySQL as my database. Any ebooks or tuts, suggestions are welcome.|||You can use selection formula
CR.selection formula=Column='Some value'"
or
CR.SQLQuery="YourQuery"
Showing posts with label regarding. Show all posts
Showing posts with label regarding. Show all posts
Sunday, March 11, 2012
Saturday, February 25, 2012
CPU
I would highly apprecite if any one guide me regarding CPU %, I check in the
task manager the CPU % goes to 100 and when I run the Profiler to findout
the query which query taking longer time then I didn'd find any query, when
I saw the Profiler all the SPs taking 0% CPU usage... what would be reason,
why CPU goes to 100%, any idea ?
Thanks
Profiler can add quite a load to an already busy server. You should create
a server side trace that traces directly to a file on a local drive to
minimize impact on the server. You can then import that trace into a table
or profiler for viewing later. Check out sp_tracecreate in BooksOnLine.
Alternately you can set up profiler how you want and then click on File -
Script Trace as 2000 to have it generate most of the code for you.
Andrew J. Kelly SQL MVP
"Rogers" <naissani@.hotmail.com> wrote in message
news:eyLJuhtPGHA.140@.TK2MSFTNGP12.phx.gbl...
>I would highly apprecite if any one guide me regarding CPU %, I check in
>the task manager the CPU % goes to 100 and when I run the Profiler to
>findout the query which query taking longer time then I didn'd find any
>query, when I saw the Profiler all the SPs taking 0% CPU usage... what
>would be reason, why CPU goes to 100%, any idea ?
> Thanks
>
|||Just want to add that the longest running query may not necessarily be the
query or queries that consume the most CPU or primarily responsible for
driving your processors to 100%.
Linchi
"Rogers" wrote:
> I would highly apprecite if any one guide me regarding CPU %, I check in the
> task manager the CPU % goes to 100 and when I run the Profiler to findout
> the query which query taking longer time then I didn'd find any query, when
> I saw the Profiler all the SPs taking 0% CPU usage... what would be reason,
> why CPU goes to 100%, any idea ?
> Thanks
>
>
|||Rogers wrote:
> I would highly apprecite if any one guide me regarding CPU %, I check
> in the task manager the CPU % goes to 100 and when I run the Profiler
> to findout the query which query taking longer time then I didn'd
> find any query, when I saw the Profiler all the SPs taking 0% CPU
> usage... what would be reason, why CPU goes to 100%, any idea ?
> Thanks
Are you sure it's the SQL Server service that's driving the CPU up? If
so, you can create a trace 9server-side preferred) and look for
SQL:BatchCompleted / RPC:Completed, and add a CPU filter of say, 500 to
start in order to see the high CPU users. Adjust the filter as needed.
As Linchi stated, long duration does not translate to high cpu. You
could have a highly parallel query run for a short time and consume a
lot of CPU. You could also have a long running transaction that consume
little CPU. You need to look at both metrics as they are both important
intheir own way.
David Gugick - SQL Server MVP
Quest Software
|||Thanks for your reply, how I can check the long running query? is there any
way I can check..
Thanks
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ufXajvVQGHA.5248@.TK2MSFTNGP09.phx.gbl...
> Rogers wrote:
> Are you sure it's the SQL Server service that's driving the CPU up? If so,
> you can create a trace 9server-side preferred) and look for
> SQL:BatchCompleted / RPC:Completed, and add a CPU filter of say, 500 to
> start in order to see the high CPU users. Adjust the filter as needed. As
> Linchi stated, long duration does not translate to high cpu. You could
> have a highly parallel query run for a short time and consume a lot of
> CPU. You could also have a long running transaction that consume little
> CPU. You need to look at both metrics as they are both important intheir
> own way.
> --
> David Gugick - SQL Server MVP
> Quest Software
>
|||Rogers wrote:
> Thanks for your reply, how I can check the long running query? is
> there any way I can check..
>
With duration from the trace using the SQL:BatchCompleted or RPC:Completed
events or SP:StmtCompleted or SQL:StmtCompleted at a lower level.
David Gugick - SQL Server MVP
Quest Software
task manager the CPU % goes to 100 and when I run the Profiler to findout
the query which query taking longer time then I didn'd find any query, when
I saw the Profiler all the SPs taking 0% CPU usage... what would be reason,
why CPU goes to 100%, any idea ?
Thanks
Profiler can add quite a load to an already busy server. You should create
a server side trace that traces directly to a file on a local drive to
minimize impact on the server. You can then import that trace into a table
or profiler for viewing later. Check out sp_tracecreate in BooksOnLine.
Alternately you can set up profiler how you want and then click on File -
Script Trace as 2000 to have it generate most of the code for you.
Andrew J. Kelly SQL MVP
"Rogers" <naissani@.hotmail.com> wrote in message
news:eyLJuhtPGHA.140@.TK2MSFTNGP12.phx.gbl...
>I would highly apprecite if any one guide me regarding CPU %, I check in
>the task manager the CPU % goes to 100 and when I run the Profiler to
>findout the query which query taking longer time then I didn'd find any
>query, when I saw the Profiler all the SPs taking 0% CPU usage... what
>would be reason, why CPU goes to 100%, any idea ?
> Thanks
>
|||Just want to add that the longest running query may not necessarily be the
query or queries that consume the most CPU or primarily responsible for
driving your processors to 100%.
Linchi
"Rogers" wrote:
> I would highly apprecite if any one guide me regarding CPU %, I check in the
> task manager the CPU % goes to 100 and when I run the Profiler to findout
> the query which query taking longer time then I didn'd find any query, when
> I saw the Profiler all the SPs taking 0% CPU usage... what would be reason,
> why CPU goes to 100%, any idea ?
> Thanks
>
>
|||Rogers wrote:
> I would highly apprecite if any one guide me regarding CPU %, I check
> in the task manager the CPU % goes to 100 and when I run the Profiler
> to findout the query which query taking longer time then I didn'd
> find any query, when I saw the Profiler all the SPs taking 0% CPU
> usage... what would be reason, why CPU goes to 100%, any idea ?
> Thanks
Are you sure it's the SQL Server service that's driving the CPU up? If
so, you can create a trace 9server-side preferred) and look for
SQL:BatchCompleted / RPC:Completed, and add a CPU filter of say, 500 to
start in order to see the high CPU users. Adjust the filter as needed.
As Linchi stated, long duration does not translate to high cpu. You
could have a highly parallel query run for a short time and consume a
lot of CPU. You could also have a long running transaction that consume
little CPU. You need to look at both metrics as they are both important
intheir own way.
David Gugick - SQL Server MVP
Quest Software
|||Thanks for your reply, how I can check the long running query? is there any
way I can check..
Thanks
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ufXajvVQGHA.5248@.TK2MSFTNGP09.phx.gbl...
> Rogers wrote:
> Are you sure it's the SQL Server service that's driving the CPU up? If so,
> you can create a trace 9server-side preferred) and look for
> SQL:BatchCompleted / RPC:Completed, and add a CPU filter of say, 500 to
> start in order to see the high CPU users. Adjust the filter as needed. As
> Linchi stated, long duration does not translate to high cpu. You could
> have a highly parallel query run for a short time and consume a lot of
> CPU. You could also have a long running transaction that consume little
> CPU. You need to look at both metrics as they are both important intheir
> own way.
> --
> David Gugick - SQL Server MVP
> Quest Software
>
|||Rogers wrote:
> Thanks for your reply, how I can check the long running query? is
> there any way I can check..
>
With duration from the trace using the SQL:BatchCompleted or RPC:Completed
events or SP:StmtCompleted or SQL:StmtCompleted at a lower level.
David Gugick - SQL Server MVP
Quest Software
Friday, February 24, 2012
covering indexes
In lot of atricles regarding sql server performacne i read about "consider
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
Sri
Hi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>
|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
Sri
Hi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>
|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
covering indexes
In lot of atricles regarding sql server performacne i read about "consider
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
SriHi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
SriHi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
covering indexes
In lot of atricles regarding sql server performacne i read about "consider
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
SriHi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
using covering indexes" .
my question is How do u create a covering index, can we create it explicitly
or
sql server creates it automatically?
Thanks
SriHi Sri
I'm a bit surprised that you read lots of articles that suggest creating
covering indexes, but you've never read one that told you what a covering
index is.
A covering index is one that includes ALL the columns from a table that are
used in a query. Normally, all that is important for an index to be used is
that the index keys are referenced in your WHERE clause, but with a
covering index, ALL the columns (from the SELECT list, the GROUP BY and any
other clause of your query) are part of the nonclustered index. Because the
covering index has everything needed to satisfy your query, SQL Server never
needs to access the actual data pages; it can stay in the index to retrieve
all the results.
So you need to examine your queries that aren't using any of your indexes,
and see if you can create one or more indexes that cover them. SQL Server
will not create these indexes automatically (unless you think of
automatically as following suggestions of the Index Tuning Wizard.)
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
> explicitly
> or
> sql server creates it automatically?
>
> Thanks
> Sri
>
>|||"Sri" <Sri@.discussions.microsoft.com> wrote in message
news:9EC780A6-9458-4A9A-A85E-0E241A1308A9@.microsoft.com...
> In lot of atricles regarding sql server performacne i read about "consider
> using covering indexes" .
> my question is How do u create a covering index, can we create it
explicitly
> or
> sql server creates it automatically?
>
Further to Kalens excellent reply, it does not have to be just one
non-clustered index. SQL can combine multiple non-clustered indexes to
cover the query.
Also the key to row ratio affects performance. If there are 2 columns
referenced in the query but 50 in the underlying table it will be faster
covering it than if there are 40 columns referenced in the query. Try to
avoid SELECT *.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004
Subscribe to:
Posts (Atom)