Last post Dec 20, 2012 12:30 PM by mjaved39
Dec 20, 2012 10:37 AM|mjaved39|LINK
Dear All i have query
select count(ID) from TableName
but this query is taking tooo much time , not giving me any result becuase i have more than 15Lack Record in my orcale table.
Could anybody help me............?
Dec 20, 2012 11:18 AM|Afzaal.Ahmad.Zeeshan|LINK
Ok there are two possiblities.
first you can (lets assume that the column is ID) get the Query.
SELECT ID FROM [table_name];
Now After this you can count it as
var result = "SELECT ID FROM [table_name]".Count();
Best method would be that you should get the query first. And than you try to count them. Its easy and precise.
And if its not giving you any result it maybe that you are using some WHERE clause. Which does not have any result. So please look whether you have a correct WHERE clause. If not than please remove.
Dec 20, 2012 12:17 PM|Dan Bracuk|LINK
It's probably not the sql. What happens if you run the same query outside your .net application?
Dec 20, 2012 12:30 PM|mjaved39|LINK
i am executing this query but it take to much time because the table has too much record. from .net application the memory exception come and pls/SQL side error comes like invalid statement.