--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/V6AuB8PhLMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
>> To post to this group, send email to redi...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/redis-db.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to redis-db+unsubscribe@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/V6AuB8PhLMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+unsubscribe@googlegroups.com.
StringRedisTemplate redisTemplate = ctx.getBean("stringRedisTemplate", StringRedisTemplate.class);
SetOperations<String, String> ops = redisTemplate.opsForSet();
long start = System.currentTimeMillis();
for(int i=0; i < 100000; i++){
boolean rslt = ops.add("key:"+i, ""+i);
}
long end = System.currentTimeMillis();
System.out.println("Simple SET: " + ((end - start)/1000.0) + " seconds");
////////////////////////////////////////////////////////////////////////////////////////////////////////////
start = System.currentTimeMillis();
redisTemplate.execute(new RedisCallback<Object>(){
@Override
public Object doInRedis(RedisConnection connection)
throws DataAccessException {
connection.openPipeline();
for(int i=0; i < 100000; i++){
connection.set(("key."+i).getBytes(), (""+i).getBytes());
}
List<Object> rslts = connection.closePipeline();
System.out.println(">>>>>>>>>>> " + rslts.get(0));
return null;
}
});
end = System.currentTimeMillis();
System.out.println("Pipelined SET: " + ((end - start)/1000.0) + " seconds");
2017년 1월 25일 수요일, Barun Kumar<barun...@gmail.com>님이 작성한 메시지: