dbTalk Databases Forums  

Upgrading PostGreSQL win32 port

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Upgrading PostGreSQL win32 port in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
V i s h a l Kashyap @ [Sai Hertz And Control Systems]
 
Posts: n/a

Default Upgrading PostGreSQL win32 port - 08-31-2004 , 12:19 AM






Dear all,
Will installing the beta 2 of win32 be a just next - next button click
sequence on windows port or does upgradation requires some tweaking etc

--
With Best Regards,
Vishal Kashyap.
Yahoo IM : coeb_college (AT) yahoo (DOT) com
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd.
http://saihertz.com


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Dmitry Karasik
 
Posts: n/a

Default First query slow, subsequent queries fast - 08-31-2004 , 02:44 AM







Hello all,

I observe a strange situation where if I issue a query it is slow, but
subsequent queries are fast. Obviously there are some caching schemes in
effect, but my question is rather about why might the first query be
_that_ slow. I realize that the query itself might be flawed, so probably
you can come up with some input. Here it is:

# query #1:

# explain analyze select * from messages where id in ( select msgkey
from queues where username like 'alk%' and hostname like '%' and time > '26
July 2004' and time < '26 August 2004' and inbound = 1);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nested Loop (cost=79.40..82.46 rows=1 width=64) (actual
time=80801.543..99005.053 rows=1996 loops=1)
-> HashAggregate (cost=79.40..79.40 rows=1 width=4) (actual
time=80789.461..80809.255 rows=1996 loops=1)
-> Index Scan using queues_idx_username on queues
(cost=0.00..79.39 rows=3 width=4) (actual time=110.044..80741.483
rows=10320 loops=1)
Index Cond: ((username >= 'alk'::text) AND (username <
'all'::text))
Filter: ((username ~~ 'alk%'::text) AND (hostname ~~
'%'::text) AND ("time" > '2004-07-26 00:00:00+02'::timestamp with time
zone) AND ("time" < '2004-08-26 00:00:00+02'::timestamp with time zone)
AND (inbound = 1))
-> Index Scan using messages_pkey on messages (cost=0.00..3.05 rows=1
width=64) (actual time=9.094..9.100 rows=1 loops=1996)
Index Cond: (messages.id = "outer".msgkey)
Total runtime: 99009.470 ms
(8 rows)


# query #2:

# explain analyze select * from messages where id in ( select msgkey
from queues where username like 'alk%' and hostname like '%' and time > '26
July 2004' and time < '26 August 2004' and inbound = 1);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nested Loop (cost=79.40..82.46 rows=1 width=64) (actual
time=155.644..199.876 rows=1996 loops=1)
-> HashAggregate (cost=79.40..79.40 rows=1 width=4) (actual
time=155.604..162.959 rows=1996 loops=1)
-> Index Scan using queues_idx_username on queues
(cost=0.00..79.39 rows=3 width=4) (actual time=0.216..141.122 rows=10320
loops=1)
Index Cond: ((username >= 'alk'::text) AND (username <
'all'::text))
Filter: ((username ~~ 'alk%'::text) AND (hostname ~~
'%'::text) AND ("time" > '2004-07-26 00:00:00+02'::timestamp with time
zone) AND ("time" < '2004-08-26 00:00:00+02'::timestamp with time zone)
AND (inbound = 1))
-> Index Scan using messages_pkey on messages (cost=0.00..3.05 rows=1
width=64) (actual time=0.012..0.014 rows=1 loops=1996)
Index Cond: (messages.id = "outer".msgkey)
Total runtime: 201.371 ms
(8 rows)



--
Sincerely,
Dmitry

--- www.karasik.eu.org ---



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.