Bug #25786 select with limit 0 get row scan
Submitted: 23 Jan 2007 15:20 Modified: 29 Mar 2011 18:51
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.11 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[23 Jan 2007 15:20] Roberto Spadim
another erro from slow query log see:
# Time: 070111  1:14:06
# User@Host: rdm[rdm] @ localhost []
# Query_time: 83  Lock_time: 0 Rows_sent: 0  Rows_examined: 0
CREATE TABLE pdp_rastreabilidade SELECT * FROM rastreabilidade LIMIT 0 OFFSET 0;
/usr/sbin/mysqld, Version: 5.1.14-beta-log (Source distribution). started with:
Tcp port: 3307  Unix socket: /tmp/mysql.BH.sock

rastreabilidade have about 2 million registers it don´t get lock since i´m using concurrency inserts and LIMIT 0 say that we don´t need select table just see .frm file
can we optimize this type of query? limit 0 could just see .frm file and return the columns that we need with no row

How to repeat:
select with limit 0

Suggested fix:
optimization need for limit 0 using .frm file
[26 Jan 2007 10:02] Hartmut Holzgraefe
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.
[29 Mar 2011 18:51] Roberto Spadim
ok closed