Re: planer picks a bad plan (seq-scan instead of index) when adding an additional join

From: "Thomas H(dot)" <me(at)alternize(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: planer picks a bad plan (seq-scan instead of index) when adding an additional join
Date: 2006-11-10 00:03:48
Message-ID: 0cda01c7045b$b34f6b50$0201a8c0@iwing
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> SELECT * FROM shop.dvds
>> LEFT JOIN oldtables.movies ON mov_id = dvd_mov_id
>> LEFT JOIN shop.data_soundmedia ON sm_info_ean = dvd_ean
>> WHERE (lower(mov_name) LIKE '%superman re%' OR lower(dvd_name) like
>> '%superman re%' OR lower(dvd_edition) LIKE '%superman re%')
>
> Um, what's the datatype of sm_info_ean and dvd_ean exactly?

varchar(15) and varchar(14)

i can make them same width if that could help - just saw the same field on
the other tables are limited to 14...

regards,
thomas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cornelia Boenigk 2006-11-10 00:33:42 zero values in statistic views
Previous Message Tom Lane 2006-11-09 23:52:36 Re: planer picks a bad plan (seq-scan instead of index) when adding an additional join