|
Home > Archive > MS SQL Server > October 2006 > SQL Sentence count disctint
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SQL Sentence count disctint
|
|
| Alejandro 2006-10-24, 6:37 pm |
| Hi I have 1 app that always make
SELECT count(DISTINCT cedula) FROM(matrix_odontogr
ama)
This is very slow in 1 MB of record, exist any way to make this more
efficient ?
| |
| Paul Ibison 2006-10-24, 6:37 pm |
| Do you have an index on cedula? If not, this will make the most difference.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
| |
| Alejandro 2006-10-24, 6:37 pm |
| yes I have 1 idx
but I found the problem... (HDD bad...)
Paul Ibison ha escrito:
> Do you have an index on cedula? If not, this will make the most difference.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
|
|
|
|
|