Re: Incoming/Sent traffic data
От | Israel Ben Guilherme Fonseca |
---|---|
Тема | Re: Incoming/Sent traffic data |
Дата | |
Msg-id | BANLkTinCbh1UOd2BFy_EToKbZ9Otmug+bQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Incoming/Sent traffic data (Maciek Sakrejda <msakrejda@truviso.com>) |
Ответы |
Re: Incoming/Sent traffic data
|
Список | pgsql-jdbc |
Thanks for the answers,
Craig, I'm already measuring the traffic only after the initial setup. It's clean data, only for the operation itself. That's why I have those lines with the comment 'Wait for ENTER KEY to clear the setup traffic'. About the log, i'm using
Macieck, I'll try to give a look on these tools. My current implementation of proxy just use sockets to transmit the data between the app (that's why the port 4444 on connections) to the database, that's how I check the size of data transfered with it (it have a GUI to clear the traffic so I can check only the operation, not the setup).
Israel
Craig, I'm already measuring the traffic only after the initial setup. It's clean data, only for the operation itself. That's why I have those lines with the comment 'Wait for ENTER KEY to clear the setup traffic'. About the log, i'm using
log_statement = "all", on the postgres config,
is there any other specific option?Macieck, I'll try to give a look on these tools. My current implementation of proxy just use sockets to transmit the data between the app (that's why the port 4444 on connections) to the database, that's how I check the size of data transfered with it (it have a GUI to clear the traffic so I can check only the operation, not the setup).
Israel
2011/5/12 Maciek Sakrejda <msakrejda@truviso.com>
> The postgre log:Based on these log messages, it looks like this particular invocation
>
> Python LOG: comando: select * from pessoa
> Java LOG: executar <unnamed>: select * from pessoa
>
> (translation from portuguese to english)
> comando -> command
> executar -> execute
in Python is using the simple query protocol [1], whereas the JDBC one
is using the extended protocol [2] (with an unnamed statement and
unnamed portal). As far as I can tell, the JDBC driver only uses the
simple protocol for COPY. The extended query protocol is a little
chattier, but I wouldn't expect a *huge* difference there.
In any case, for what you're doing, I would strongly recommend looking
at a tool like Wireshark or tcpdump to get more accurate results and
more insight into what happens on the wire. E.g., I'm rather surprised
that the Java bytes written is 5 times (!) lower than the Python
version. Make sure you know what you're actually measuring.
[1]: http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#AEN91249
[2]: http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
---
Maciek Sakrejda | System Architect | Truviso
1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com
В списке pgsql-jdbc по дате отправления: