Click here to Skip to main content
15,912,205 members
Home / Discussions / Database
   

Database

 
QuestionInsert Date using oledbcommand Pin
cocoonwls19-Apr-07 0:18
cocoonwls19-Apr-07 0:18 
AnswerRe: Insert Date using oledbcommand Pin
Kschuler19-Apr-07 10:27
Kschuler19-Apr-07 10:27 
GeneralRe: Insert Date using oledbcommand Pin
cocoonwls19-Apr-07 15:52
cocoonwls19-Apr-07 15:52 
QuestionSelect count and select Pin
N a v a n e e t h18-Apr-07 22:37
N a v a n e e t h18-Apr-07 22:37 
AnswerRe: Select count and select Pin
Pete O'Hanlon18-Apr-07 22:50
mvePete O'Hanlon18-Apr-07 22:50 
AnswerRe: Select count and select Pin
Colin Angus Mackay18-Apr-07 22:56
Colin Angus Mackay18-Apr-07 22:56 
GeneralRe: Select count and select Pin
N a v a n e e t h19-Apr-07 1:22
N a v a n e e t h19-Apr-07 1:22 
GeneralRe: Select count and select Pin
Colin Angus Mackay19-Apr-07 1:46
Colin Angus Mackay19-Apr-07 1:46 
DooDooo wrote:
What I mean to say was my friend told that select count(*) will take much time that executing select * from table. Because first it will select all data from table and finds the count. I just wanted to know whether this is rite or not ?


You also have to take in to consideration network bandwidth used. SELECT COUNT(*) FROM MyTable returns a single value. SELECT * FROM MyTable returns the entire contents of the table.

Also, I'd guess the COUNT(*) would be able to take into account an index so it wouldn't actually have to read every single row, just one of the indexes (which would be a lot less data)


Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...

Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton


My website

GeneralRe: Select count and select Pin
N a v a n e e t h19-Apr-07 2:58
N a v a n e e t h19-Apr-07 2:58 
Questiondata moving Pin
tradakad18-Apr-07 22:16
tradakad18-Apr-07 22:16 
AnswerRe: data moving Pin
Colin Angus Mackay18-Apr-07 22:25
Colin Angus Mackay18-Apr-07 22:25 
GeneralRe: data moving Pin
tradakad18-Apr-07 22:47
tradakad18-Apr-07 22:47 
GeneralRe: data moving Pin
Mike Dimmick19-Apr-07 3:17
Mike Dimmick19-Apr-07 3:17 
GeneralRe: data moving Pin
Colin Angus Mackay19-Apr-07 3:25
Colin Angus Mackay19-Apr-07 3:25 
Questionupdate statement syntax error Pin
rkherath18-Apr-07 21:45
rkherath18-Apr-07 21:45 
AnswerRe: update statement syntax error Pin
Colin Angus Mackay18-Apr-07 22:24
Colin Angus Mackay18-Apr-07 22:24 
GeneralRe: update statement syntax error Pin
rkherath18-Apr-07 22:46
rkherath18-Apr-07 22:46 
Questionshow tables Pin
tradakad18-Apr-07 20:35
tradakad18-Apr-07 20:35 
AnswerRe: show tables Pin
gauthee18-Apr-07 20:55
gauthee18-Apr-07 20:55 
GeneralRe: show tables Pin
tradakad18-Apr-07 21:46
tradakad18-Apr-07 21:46 
GeneralRe: show tables Pin
gauthee18-Apr-07 22:47
gauthee18-Apr-07 22:47 
Question2-way Merge Replication(PDASql Server 2000) Pin
ayyappa4902118-Apr-07 19:41
ayyappa4902118-Apr-07 19:41 
Questionfind exact Hour and minutes..... Pin
Member 387988118-Apr-07 19:05
Member 387988118-Apr-07 19:05 
AnswerRe: find exact Hour and minutes..... Pin
Krish - KP18-Apr-07 19:28
Krish - KP18-Apr-07 19:28 
GeneralRe: find exact Hour and minutes..... Pin
Member 387988118-Apr-07 19:40
Member 387988118-Apr-07 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.