Re: numRows()

From: Date: Sun, 10 Dec 2000 09:43:56 +0000
Subject: Re: numRows()
References: 1 2 3 4  Groups: php.pear 
Request: Send a blank email to php-pear+get-624@lists.php.net to get a copy of this message
Paul DuBois wrote: > > At 3:12 PM +0300 12/8/00, Mikhail Zabaluev wrote: > >Hello Stig, > > > >On Fri, Dec 08, 2000 at 11:10 +0100, Stig S. Bakken wrote: > >> > >> "James L. Pine" wrote: > >> > > >> > On Fri, 8 Dec 2000, Stig S. Bakken wrote: > >> > > >> > > What does affectedRows return for Oracle when you do "delete from > >> > > table"? Mysql_affected_rows() returns 0 in this case. This can be > >> > > emulated by sneaking in a "select (*) from" first, but > >> > > that's not giving > >> ^ > >> There's a "count" missing up here ----' > > > >Queries like this are believed to be very fast in MySQL, so why not? > > Actually, SELECT COUNT(*) FROM tbl_name is very fast normally, except if > your table is a BDB table. Apparently no magic number is stored in the > underlying files for that kind of table, so SELECT COUNT(*) is actually > kind of slow. I believe there may be some work afoot on fixing this in > future versions. It was implemented with "DELETE FROM table WHERE 1 = 1" instead. Yiee-haa. :-P - Stig

« previous php.pear (#624) next »