General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>1) Michael is looking for () is a the number of records with unique values in field1. Your query above returns the number of times each value appears.
>2) and in general DISTINCT slows performance.
>Now what will work in one select is:
>SELECT COUNT(DISTINCT field1) FROM delme
>Per the hackers guide.
If a rep works on 4 projects, they're still only 1 rep.
So should distinct be used if it's slower? Is it significantly slower than a two-step process for large tables? (my tables are likely to be <100 records anyway)
per hackers guide =?= not supported tomorrow, or just not documented anywhere else? (versions aren't an issue either, this company will probably never upgrade either)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only