I would like to introduce a new open source software,
PostgreSQL Query Cache, which enables to improve query performance
extremely (10x~100x) by caching query results in front of backends.
PostgreSQL Query Cache:
- waits connections on the different port from the clients.
- delegates queries in front of the backends, like a proxy.
- intercepts and caches SELECT query results.
- also manages lifecycle of the query cache.
For more information, please visit following presentation:
http://www.slideshare.net/uptimeforce/postgresql-query-cache-pqc
Please visit the project page, and enjoy extreme performance. :)
Regards,
--
NAGAYASU Satoshi <satoshi....@gmail.com>
Sorry for a delayed respoonse.
2011/3/7 ipConfig <Pohlt...@aol.com>:
> Are there any known benchmarks?
> Or do you have an idea how to measure your programm e.g. a little
> programm in the background which counts the hits?
> Or some kind of flag in the conf-file which will write hits/misses in
> a log file?
Well, pqc does not have dedicated statistics feature right now.
And, yes, pqc should have it.
I think memcached working behind pqc has its statistics feature,
but I have not tried yet.
Statistic feature should be in top of the feature list.
Thanks for the comments.
Regards,
--
Satoshi Nagayasu <satoshi....@gmail.com>
2011/3/7 ipConfig <Pohlt...@aol.com>:
> I have some problems executing the Program...
> This is what i get:
I'm afraid that I can't see what the problems are.
The attached debug log seems to be showing only messages at its startup.
You can see more details if you catch logs during executing queries
with/without hints.
Thanks for reporting about that.
About 10 days ago, I fixed a bug which fails query caching
when a SELECT statement contains some control (non-ascii)
characters, such as '\n', '\t' or else.
http://code.google.com/p/pqc/source/detail?r=3#
If the query cache works correctly when you remove 'CR+LF'
thing from the SELECT statement, this has been already fixed
in the latest code in the repository.
Can you try to run the statement in just one line to determine
the problem?
I will check more details tomorrow, because I'm re-installing
my desktop pc right now...
Regards,
--
NAGAYASU Satoshi <satoshi....@gmail.com>
2011/04/07 21:21, ipConfig wrote:
> Hi @ all,
>
> When using the following statement i get an error:
>
> mo_rehmann_home=# /* cache:on */SELECT i.TABLE_name
> mo_rehmann_home-# FROM information_schema.TABLEs i, pg_class c
> mo_rehmann_home-# WHERE TABLE_schema != 'information_schema'
> mo_rehmann_home-# AND i.TABLE_name = c.relname
> mo_rehmann_home-# AND c.relkind = 'v'
> mo_rehmann_home-# ;
> Time: 44.119 ms
> mo_rehmann_home=# /* cache:on */SELECT i.TABLE_name
> FROM information_schema.TABLEs i, pg_class c
> WHERE TABLE_schema != 'information_schema'
> AND i.TABLE_name = c.relname
> AND c.relkind = 'v'
> ;
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
> mo_rehmann_home=#
I tried same query to reproduce the issue, but I can't catch it.
What do you see when you start pqcd with '-d -n' options
to print more detailed debug messages?
It would be helpful to determine the issue.
Following is my result of the run.
---------------------------------------------------------------
[snaga@devsv02 src]$ /usr/local/pgsql/bin/psql -p 9999 testdb
psql (9.0.2)
Type "help" for help.
testdb=# \timing
Timing is on.
testdb=# /* cache:on */SELECT i.TABLE_name
testdb-# FROM information_schema.TABLEs i, pg_class c
testdb-# WHERE TABLE_schema != 'information_schema'
testdb-# AND i.TABLE_name = c.relname
testdb-# AND c.relkind = 'v'
testdb-# ;
table_name
--------------------------
pg_roles
pg_shadow
pg_group
<...snip...>
pg_stat_bgwriter
pg_user_mappings
pg_statio_user_tables
(36 rows)
Time: 6.371 ms
testdb=# /* cache:on */SELECT i.TABLE_name
FROM information_schema.TABLEs i, pg_class c
WHERE TABLE_schema != 'information_schema'
AND i.TABLE_name = c.relname
AND c.relkind = 'v'
;
table_name
--------------------------
pg_roles
pg_shadow
pg_group
<...snip...>
pg_stat_bgwriter
pg_user_mappings
pg_statio_user_tables
(36 rows)
Time: 0.718 ms
testdb=# \q
[snaga@devsv02 src]$
---------------------------------------------------------------