George Silva wrote on 01/28/2015
11:49 AM:
# explain analyze insert into rstr values ('k4434', '3234234'); QUERY PLAN -------------------------------------------------------------------------------------------- Insert on rstr (cost=0.00..0.01 rows=1 width=0) (actual time=0.288..0.288 rows=0 loops=1) -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.002 rows=1 loops=1) Planning time: 0.092 ms Execution time: 0.582 ms # explain analyze select * from rstr where key = 'k4434'; QUERY PLAN ----------------------------------------------------------------------------------------------------- Foreign Scan on rstr (cost=10.00..11.00 rows=1 width=68) (actual time=0.541..0.595 rows=1 loops=1) Planning time: 0.382 ms Execution time: 0.642 ms I did do a benchmark in Golang to see the difference between redis-fdw, temp-table, and table: SELECT: Redis FDW: 240663 ns/op TEMP TABLE: 1130329 ns/op TABLE: 764774 ns/op INSERT: Redis FDW: 187788 ns/op TEMP TABLE: 106843 ns/op TABLE: 3093156 ns/op redis-fdw is currently unoptimized (no table option caching, etc) so there is room for improvement. But so far so good. Leon
|