Re: Slow query after upgrades
От
Guillaume Smet
Тема
Re: Slow query after upgrades
Дата
Msg-id
1d4e0c10712131452l65841793r449eb3c7cffbf3a5@mail.gmail.com
Ответ на
Re: Slow query after upgrades (Tom Duffey)
Список
Дерево обсуждения
Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades Albert László-Róbert<albertlaszlorobert@gmail.com>
Re: Slow query after upgrades "Guillaume Smet" <guillaume.smet@gmail.com>
Re: Slow query after upgrades Albert László-Róbert<albertlaszlorobert@gmail.com>
Re: Slow query after upgrades Kris Jurka <books@ejurka.com>
Re: Slow query after upgrades Albert László-Róbert<albertlaszlorobert@gmail.com>
Re: Slow query after upgrades Oliver Jowett <oliver@opencloud.com>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades "Guillaume Smet" <guillaume.smet@gmail.com>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades "Guillaume Smet" <guillaume.smet@gmail.com>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades Oliver Jowett <oliver@opencloud.com>
Re: Slow query after upgrades Tom Lane <tgl@sss.pgh.pa.us>
Re: Slow query after upgrades Oliver Jowett <oliver@opencloud.com>
Re: Slow query after upgrades "Guillaume Smet" <guillaume.smet@gmail.com>
Re: Slow query after upgrades Tom Lane <tgl@sss.pgh.pa.us>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades Tom Lane <tgl@sss.pgh.pa.us>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
Re: Slow query after upgrades Oliver Jowett <oliver@opencloud.com>
Re: Slow query after upgrades Tom Duffey <tduffey@techbydesign.com>
On Dec 13, 2007 11:37 PM, Tom Duffey wrote:
> foo=> EXPLAIN SELECT point_history.point_id, point_history.timestamp,
> point_history.value, point_history.status FROM point_history WHERE
> point_history.point_id = 21001 AND point_history.timestamp >=
> '2007-12-11 22:22:45' ORDER BY point_history.timestamp DESC;
> QUERY PLAN
> ------------------------------------------------------------------------------------------------------------
> Index Scan Backward using point_history_pkey on point_history
> (cost=0.00..264.60 rows=58 width=20)
> Index Cond: ((point_id = 21001) AND ("timestamp" >= '2007-12-11
> 22:22:45'::timestamp without time zone))
> (2 rows)
It's not an EXPLAIN ANALYZE so we can't see if the query is slow or fast.
If it's fast using the parameters in psql, just try to add
protocolVersion=2 to your JDBC connection URL as I told you earlier.
It should solve your problem. You won't be able to use new features of
protocol v3 but if you used 7.4 before, it shouldn't be a problem for
you.
--
Guillaume
В списке pgsql-jdbc по дате отправления