From: Stewart Ben (RBAU/EQS4) * <Ben.Stewart@au.bosch.com>
To: pgsql-sql@postgresql.org
Subject: Re: SEVEN cross joins?!?!?
Date: Thu, 13 Oct 2005 12:02:42 +1000
Message-ID: <E253BDD7F008244585AEE87AF8F0224F116C7ACB@cl-mail01.au.bosch.com> (raw)
> Splitting locations into subsets (like 2,2,3) doesn't work
> because it is possible that low values in one location can be offset
by
> high values in another location, and still result in an excellent
combo.
>
> The good news is these suggestions got me thinking outside
> the box. I think I can program a modified brute-force that bypasses
> large numbers of combos early. It might still be too large/slow, so
I'd be
> interested in finding more info about these "smarter algorithms" in
option
Could you define an view with a calculated field, say, 2 * a1 + 6 * a2 +
3 * a3, and then use this aggregate to score the individual rows? I
haven't looked at the exact nature of the problem, but if you're
multiplying a table by itself, it may be worth redefining the problem in
terms of a simple ranking algorithm, define a column to calculate this,
then sort by that column.
Best regards,
Ben Stewart
--
Robert Bosch (Australia) Pty. Ltd.
Engineering Quality Services, Student Software Engineer (RBAU/EQS4)
Locked Bag 66 - Clayton South, VIC 3169 - AUSTRALIA
Tel: +61 3 9541-7002 Fax: +61 3 9541-7700
mailto:ben.stewart@au.bosch.com
http://www.bosch.com.au/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: Ben.Stewart@au.bosch.com
Subject: Re: SEVEN cross joins?!?!?
In-Reply-To: <E253BDD7F008244585AEE87AF8F0224F116C7ACB@cl-mail01.au.bosch.com>
References: <E253BDD7F008244585AEE87AF8F0224F116C7ACB@cl-mail01.au.bosch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox