On Apr 21, 9:52 pm, kevin.gritt...@wicourts.gov ("Kevin Grittner")
wrote:
> I wrote:
> > ALTER TABLE ALTER plugins_guide_address
> > ALTER COLUMN city_id SET STATISTICS 1000;
>
> One too many ALTERs in there. Should be:
>
> ALTER TABLE plugins_guide_address
> ALTER COLUMN city_id SET STATISTIC
> Try this:
>
> ALTER TABLE ALTER plugins_guide_address
> ALTER COLUMN city_id SET STATISTICS 1000;
> ANALYZE plugins_guide_address;
>
> Then try your query.
No luck... The same query time...
> I have one more diagnostic query to test, if the above doesn't work:
>
> explain analyze
> SELECT id F
Kevin,
thanks for your time!
Here the requested tests.
> (1) Try it without the ORDER BY clause and the LIMIT.
W/o the 'order by' it works instantly (about 1ms!)
Limit (cost=0.00..3.59 rows=5 width=4) (actual time=0.127..0.229
rows=5 loops=1)
-> Nested Loop (cost=0.00..277863.53 rows=386544
On Apr 13, 5:28 am, kevin.gritt...@wicourts.gov ("Kevin Grittner")
wrote:
> The cost settings help the optimizer make good decisions about plan
> choice. I guess I don't have much reason to believe, at this point,
> that there is a better plan for it to choose for this query. Do you
> think you s
Kevin,
I appreciate your help very much!
> Since the LIMIT 3 and LIMIT 4 queries generated exactly the same
> plan, the increased time for LIMIT 4 suggests that there are 3
> matching rows which are near the end of the index it is scanning, but
> the fourth one is much farther in.
Yes, you are rig
On Apr 10, 6:48 am, robertmh...@gmail.com (Robert Haas) wrote:
> On Tue, Apr 6, 2010 at 8:42 PM, norn wrote:
> > I have some mysterious slow downs with ORDER BY and LIMIT. When LIMIT
> > getting greater than some value (greater than 3 in my case), query
> > takes 4-5 secs i
Kevin, thanks for your attention!
I've read SlowQueryQuestions, but anyway can't find bottleneck...
Here requested information:
OS: Ubuntu 9.10 64bit, Postgresql 8.4.2 with Postgis
Hardware: AMD Phenom(tm) II X4 945, 8GB RAM, 2 SATA 750GB (pg db
installed in software RAID 0)
Please also note that
Hi there!
I have some mysterious slow downs with ORDER BY and LIMIT. When LIMIT
getting greater than some value (greater than 3 in my case), query
takes 4-5 secs instead of 0.25ms. All of the necessary indexes are in
place. I have no idea what to do, so any advices are welcome!
Here my queries an