Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, 16 Jan 2020 at 20:20, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
Well, what should the poor thing do?
There is no index on "LucrareBugetDateId".

I did add an index on "LucrareBugetDateId" (before accidentally "fixing" the problem with ANALYZE) and it didn't help.
 
Rather, you have two indexes on ("LucrareBugetVersiuneId", "LucrareBugetDateId"),
one of which should be dropped.

One will be dropped. The second one was added out of desperation (because it wasn't using the first one).
 
Try with an index on "LucrareBugetDateId".

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux