Re: Query optimization issue.

2001-08-25 Thread Jeremy Zawodny
On Thu, Aug 23, 2001 at 11:11:38AM -0700, Steven Roussey wrote: mysql explain select * from dominf.domip order by ip desc; 'ORDER BY something DESC' does not use an index. It must be ascending. See the manual. Also, I forgot, if you do this often and it needs to be in DESC order,

Re: Query optimization issue.

2001-08-23 Thread Steven Roussey
mysql explain select * from dominf.domip order by ip desc; 'ORDER BY something DESC' does not use an index. It must be ascending. See the manual. Also, I forgot, if you do this often and it needs to be in DESC order, you can always alter the app to create and use an extra column 'ip_desc

Query optimization issue.

2001-08-22 Thread Peter Zaitsev
Hello mysql, I was trying to load very huge (5GB 45mil rows) to the text dump in sorted order (according to primary key). The problem is mysql somehow does not wants to scan the table by primary key to produce sorted output row by row, but prefers to use filesort which would take

Re: Query optimization issue.

2001-08-22 Thread Rafal Jank
Peter Zaitsev wrote: Hello mysql, I was trying to load very huge (5GB 45mil rows) to the text dump in sorted order (according to primary key). The problem is mysql somehow does not wants to scan the table by primary key to produce sorted output row by row, but prefers to use

Re: Query optimization issue.

2001-08-22 Thread Rafal Jank
Rafal Jank wrote: Peter Zaitsev wrote: Hello mysql, I was trying to load very huge (5GB 45mil rows) to the text dump in sorted order (according to primary key). The problem is mysql somehow does not wants to scan the table by primary key to produce sorted output row by

Re: Query optimization issue.

2001-08-22 Thread Steven Roussey
mysql explain select * from dominf.domip order by ip desc; 'ORDER BY something DESC' does not use an index. It must be ascending. See the manual. Sincerely, Steven Roussey http://Network54.com/?pp=e - Before posting, please

Query optimization issue.

2001-08-22 Thread Michael Widenius
Hi! Peter == Peter Zaitsev [EMAIL PROTECTED] writes: Peter Hello mysql, Peter I was trying to load very huge (5GB 45mil rows) to the text dump in Peter sorted order (according to primary key). Peter The problem is mysql somehow does not wants to scan the table by Peter primary key to