Re: Precedence in WHERE clauses.

2014-03-19 Thread Glyn Astill
From: Christophe t...@stuxnet.org To: mysql@lists.mysql.com Cc: Sent: Tuesday, 18 March 2014, 19:10 Subject: Precedence in WHERE clauses. Hi list, I'd like to get your advice about precedence in where clauses in MySQL (5.0.51, and 5.1.66 in this case / from lenny and squeeze Debian

ANN: Database Workbench 4.4.5, special MySQL discount!

2014-03-19 Thread Martijn Tonies (Upscene Productions)
using discount coupon MYSQLSPECIAL - additional modules can be purchased at a later stage. For more information, see http://www.upscene.com/go/?go=newsid=20140319 The FREE Lite Editions will be released at a later stage. Database Workbench supports: - Borland InterBase ( 6.x and up

Re: Precedence in WHERE clauses.

2014-03-19 Thread Morgan Tocker
Hi Christophe, Considering the following simple query : SELECT * FROM Status WHERE DWProcessed = 0 AND PreviousStatus NOT IN ('PENDING', 'ACCEPTED') AND SubscribeDate DATE_SUB(NOW(), INTERVAL 24 HOUR); Which of these filters are processed first ? I'd like the first filter

Re: Precedence in WHERE clauses.

2014-03-19 Thread Reindl Harald
Am 19.03.2014 15:05, schrieb Morgan Tocker: When a MySQL server receives a query, it goes through a process called query optimization and tries to determine the best way to execute it (based on availability of indexes etc) The order of the WHERE clause does not matter that is simply not

Re: Precedence in WHERE clauses.

2014-03-19 Thread Morgan Tocker
Reindl, The order of the WHERE clause does not matter that is simply not true otherwise that documentation would not exist http://dev.mysql.com/doc/refman/5.5/en/multiple-column-indexes.html Yes, the order of the columns in composite indexes *does matter*. This is a different question

Re: Precedence in WHERE clauses.

2014-03-19 Thread Reindl Harald
Am 19.03.2014 16:27, schrieb Morgan Tocker: Reindl, you can call me Harald The order of the WHERE clause does not matter that is simply not true otherwise that documentation would not exist http://dev.mysql.com/doc/refman/5.5/en/multiple-column-indexes.html Yes, the order of the

Re: Precedence in WHERE clauses.

2014-03-19 Thread Mogens Melander
G'morning A function in a where equals what ? On Wed, March 19, 2014 15:05, Morgan Tocker wrote: Hi Christophe, Considering the following simple query : SELECT * FROM Status WHERE DWProcessed = 0 AND PreviousStatus NOT IN ('PENDING', 'ACCEPTED') AND SubscribeDate DATE_SUB(NOW(), INTERVAL

Re: Precedence in WHERE clauses.

2014-03-19 Thread shawn l.green
On 3/19/2014 7:27 PM, Mogens Melander wrote: G'morning A function in a where equals what ? On Wed, March 19, 2014 15:05, Morgan Tocker wrote: Hi Christophe, Considering the following simple query : SELECT * FROM Status WHERE DWProcessed = 0 AND PreviousStatus NOT IN ('PENDING',