Unix Technical Forum

Re: SQL query never ends

This is a discussion on Re: SQL query never ends within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Sorry it doesn't work. I connect to 192.168.0.8 but Wireshark doesn't caputre anything on the database port. I'll try ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 12:13 AM
James Im
 
Posts: n/a
Default Re: SQL query never ends

Sorry it doesn't work. I connect to 192.168.0.8 but Wireshark doesn't
caputre anything on the database port.

I'll try to reproduced the problem on linux.

Dave Cramer wrote:
>James,
>
>Change the connection so that it connects to the ethernet device on
>the box, then Wireshark can listen to it.
>
>--dc--
>On 10-Aug-06, at 6:45 AM, James Im wrote:
>
>>I've done some more tests and I think that I can say that a same
>>connection is not used by several thread at the same time.
>>However different connections are being used by several threads at the
>>same time.
>>
>>>Can you capture the network traffic between the server and JDBC driver?

>>I don't know how to do that on Windows. Wireshark cannot listen to the
>>windows loopback interface.
>>
>>Have you seen the thread dump? Does it helps you at all?
>>
>>________________________________________________ _________________
>>Ta' på udsalg året rundt på MSN Shopping: http://shopping.msn.dk -
>>her finder du altid de bedste priser
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 3: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/docs/faq
>>

>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>


__________________________________________________ _______________
Find dine dokumenter lettere med MSN Toolbar med Windows-pc-søgning:
http://toolbar.msn.dk


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 12:14 AM
Mark Lewis
 
Posts: n/a
Default Re: SQL query never ends

Yeah, Windows special-cases even non-loopback local network traffic and
bypasses the packet sniffer. I once had to do some iptables magic with
a Linux box to bounce local traffic off a remote server and back in so I
could sniff it.

-- Mark

On Thu, 2006-08-10 at 14:55 +0000, James Im wrote:
> Sorry it doesn't work. I connect to 192.168.0.8 but Wireshark doesn't
> caputre anything on the database port.
>
> I'll try to reproduced the problem on linux.
>
> Dave Cramer wrote:
> >James,
> >
> >Change the connection so that it connects to the ethernet device on
> >the box, then Wireshark can listen to it.
> >
> >--dc--
> >On 10-Aug-06, at 6:45 AM, James Im wrote:
> >
> >>I've done some more tests and I think that I can say that a same
> >>connection is not used by several thread at the same time.
> >>However different connections are being used by several threads at the
> >>same time.
> >>
> >>>Can you capture the network traffic between the server and JDBC driver?
> >>I don't know how to do that on Windows. Wireshark cannot listen to the
> >>windows loopback interface.
> >>
> >>Have you seen the thread dump? Does it helps you at all?
> >>
> >>________________________________________________ _________________
> >>Ta' p udsalg ret rundt p MSN Shopping: http://shopping.msn.dk -
> >>her finder du altid de bedste priser
> >>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 3: Have you checked our extensive FAQ?
> >>
> >> http://www.postgresql.org/docs/faq
> >>

> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 4: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >

>
> __________________________________________________ _______________
> Find dine dokumenter lettere med MSN Toolbar med Windows-pc-sgning:
> http://toolbar.msn.dk
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 12:14 AM
Nicholas E. Wakefield
 
Posts: n/a
Default Unexpected Statement Caching with CURRENT_TIMESTAMP

I'm executing 'SELECT CURRENT_TIMESTAMP' from a statement object with
auto commit off and prepare threshold set to 1. I'm finding that the
result comes back the same for after multiple calls and instantiations
of the statement object(The same happens for a prepared statement).
However this does not occur when I perform a commit before or after
every call.

Is this expected behaviour?

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-16-2008, 12:14 AM
Dave Cramer
 
Posts: n/a
Default Re: Unexpected Statement Caching with CURRENT_TIMESTAMP

Nicholas,

Yes this is expected behaviour. The time is the time when you started
the transaction. It has nothing to do with JDBC.

Dave
On 10-Aug-06, at 8:37 PM, Nicholas E. Wakefield wrote:

> I'm executing 'SELECT CURRENT_TIMESTAMP' from a statement object with
> auto commit off and prepare threshold set to 1. I'm finding that the
> result comes back the same for after multiple calls and instantiations
> of the statement object(The same happens for a prepared statement).
> However this does not occur when I perform a commit before or after
> every call.
>
> Is this expected behaviour?
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-16-2008, 12:14 AM
Markus Schaber
 
Posts: n/a
Default Re: Unexpected Statement Caching with CURRENT_TIMESTAMP

Hi, Nicolas,

Nicholas E. Wakefield wrote:
> I'm executing 'SELECT CURRENT_TIMESTAMP' from a statement object with
> auto commit off and prepare threshold set to 1. I'm finding that the
> result comes back the same for after multiple calls and instantiations
> of the statement object(The same happens for a prepared statement).
> However this does not occur when I perform a commit before or after
> every call.
>
> Is this expected behaviour?


Yes, it's expected, intended and documented in the PostgreSQL docs:
http://www.postgresql.org/docs/8.1/s...-datetime.html

SELECT timeofday(); returns a clock that advances even during
transactions. As it returns a textual representation, you may need to
cast it to a timestamp in some query contexts, though:

select timeofday(); -- returns text
select timeofday()::timestamp; -- returns timestamp - postgresql variant
select CAST(timeofday() AS timestamp) ; -- returns timestamp in sql99

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

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

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:38 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com