Richard Huxton [EMAIL PROTECTED] writes:
Large table representing non-overlapping blocks:
blocks(id int4, min varchar, max varchar)
SELECT * FROM blocks WHERE 'ABCDE' BETWEEN min AND max;
The estimator gets the wrong plan because it doesn't realise there's
(at most) only one block that can
On Wednesday 25 February 2004 22:37, Tom Lane wrote:
I wrote:
try writing
WHERE 'ABCDE' = pr_min AND 'ABCDE' = pr_max
AND pr_min (SELECT pr_min FROM table
WHERE pr_min 'ABCDE'
ORDER BY pr_min LIMIT 1)
The idea here is to
On Thu, Feb 26, 2004 at 07:55:14 -0700,
Edmund Bacon [EMAIL PROTECTED] wrote:
On Wed, 2004-02-25 at 12:18, Richard Huxton wrote:
As a complete aside:
Is there any advantage to use varchar instead of type text?
Only if there is a business rule that limits the length of the data.
On Wed, 2004-02-25 at 12:18, Richard Huxton wrote:
As a complete aside:
Is there any advantage to use varchar instead of type text?
Thanks
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
Large table representing non-overlapping blocks:
blocks(id int4, min varchar, max varchar)
SELECT * FROM blocks WHERE 'ABCDE' BETWEEN min AND max;
The estimator gets the wrong plan because it doesn't realise there's (at most)
only one block that can match.
Can't use any of the geometry
On Wednesday 25 February 2004 19:18, Richard Huxton wrote:
Large table representing non-overlapping blocks:
blocks(id int4, min varchar, max varchar)
SELECT * FROM blocks WHERE 'ABCDE' BETWEEN min AND max;
The estimator gets the wrong plan because it doesn't realise there's (at
most) only
Richard Huxton wrote:
That's not quite the same though, because it means I need to split
ABCAA..ABDBB into ABCAA..ABCZZ and ABDAA..ABDZZ but it's close enough unless
someone is feeling clever this evening.
Would (a series of) partial indexes help?
Joe
---(end of
On Wednesday 25 February 2004 20:56, Joe Conway wrote:
Richard Huxton wrote:
That's not quite the same though, because it means I need to split
ABCAA..ABDBB into ABCAA..ABCZZ and ABDAA..ABDZZ but it's close enough
unless someone is feeling clever this evening.
Would (a series of) partial
On Wednesday 25 February 2004 21:32, Tom Lane wrote:
Richard Huxton [EMAIL PROTECTED] writes:
Large table representing non-overlapping blocks:
blocks(id int4, min varchar, max varchar)
SELECT * FROM blocks WHERE 'ABCDE' BETWEEN min AND max;
The estimator gets the wrong plan because it
I wrote:
try writing
WHERE 'ABCDE' = pr_min AND 'ABCDE' = pr_max
AND pr_min (SELECT pr_min FROM table
WHERE pr_min 'ABCDE'
ORDER BY pr_min LIMIT 1)
The idea here is to add an upper bound on pr_min to the index scan
10 matches
Mail list logo