X-Original-To: pgsql-sql@postgresql.org Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 1CD364764F5 for ; Wed, 12 Mar 2003 16:44:42 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 5385AD60D; Wed, 12 Mar 2003 13:44:43 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 4940E5C04; Wed, 12 Mar 2003 13:44:43 -0800 (PST) Date: Wed, 12 Mar 2003 13:44:43 -0800 (PST) From: Stephan Szabo To: Dan Langille Cc: Subject: Re: extending ORDER BY make query much slower In-Reply-To: <3E6F45D8.15284.5994716@localhost> Message-ID: <20030312134250.D56401-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200303/316 X-Sequence-Number: 12355 On Wed, 12 Mar 2003, Dan Langille wrote: > explain analyse > SELECT element.id, > commit_log.id AS my_commit_log_id, > commit_log.message_id, > to_char(commit_log.commit_date - SystemTimeAdjust(), 'DD Mon > YYYY') AS commit_date, > to_char(commit_log.commit_date - SystemTimeAdjust(), > 'HH24:MI') AS commit_time, > commit_log.committer, > commit_log.description, > commit_log.encoding_losses, > commit_log.message_subject, > element.name, > commit_log_elements.revision_name, > element_pathname(element.id) AS element_pathname > FROM commit_log, commit_log_elements, element > WHERE commit_log_elements.commit_log_id = commit_log.id > AND commit_log_elements.element_id = element.id > ORDER BY commit_log.commit_date DESC, > my_commit_log_id > LIMIT 100; As a question, is it faster if both are marked DESC?