Question: why information_schema database is so sloooooow when SELECT is used instead of SHOW?

2006-05-13 Thread tom soyer
I have a few large databases each has over 1,000 tables. If I use the "SHOW tables;" statement, then mysql returns all the names of the tables in any one of my large databases in about 0.07 seconds. Very fast. But if I use the standard statement: "SELECT table_name FROM INFORMATION_SCHEMA.TABLES W

Re: Is this a bug of stored procedure?

2006-05-10 Thread tom soyer
never mind. I found the answer: http://dev.mysql.com/tech-resources/articles/mysql-storedproc.html On 5/10/06, tom soyer <[EMAIL PROTECTED]> wrote: Hi, I tried to pass the name of a table into a procedure and use that in a select statement. Somehow it doesn't work. Here

Is this a bug of stored procedure?

2006-05-10 Thread tom soyer
Hi, I tried to pass the name of a table into a procedure and use that in a select statement. Somehow it doesn't work. Here is the code: create procedure sp3(in tablename varchar(10)) begin select count(*) from tablename; end$ When the procedure is called, I got the following error: ERROR 1146 (

Is this a bug of stored procedure?

2006-05-10 Thread tom soyer
Hi, I tried to pass the name of a table into a procedure and use that in a select statement. Somehow it doesn't work. Here is the code: create procedure sp3(in tablename varchar(10)) begin select count(*) from tablename; end$ When the procedure is called, I got the following error: ERROR 1146 (