Greetings all and here is the challenge ...
i want to write an sql statement to count the number of distinct rows in a large table of approx 500k records (oracle 7.x/8.x unix/nt)
i suspect that there must be an easy way and i am ready to kick myself (dont laugh too loud !)
the number of columns precludes naming them individually (too time consuming)
the best i can come up with that works is :
select count(*) from (select distinct * from table)
but this is slow due to retrieving all rows in inner loop i assume
does not work:
select count(distinct *) from table or
select count(distinct t.*) from table t
all ideas considered and thank you in advance ...
Best of Irish Luck, David.
djwilkes@hotmail.com
i want to write an sql statement to count the number of distinct rows in a large table of approx 500k records (oracle 7.x/8.x unix/nt)
i suspect that there must be an easy way and i am ready to kick myself (dont laugh too loud !)
the number of columns precludes naming them individually (too time consuming)
the best i can come up with that works is :
select count(*) from (select distinct * from table)
but this is slow due to retrieving all rows in inner loop i assume
does not work:
select count(distinct *) from table or
select count(distinct t.*) from table t
all ideas considered and thank you in advance ...
Best of Irish Luck, David.
djwilkes@hotmail.com