Csql Cache Presentation

download Csql Cache Presentation

of 21

  • date post

  • Category


  • view

  • download


Embed Size (px)


CSQL Caching enables applications to significantly improve its throughput. As data is cached on the main-memory database, cache delivers a real-time, dynamic, updatable cache for frequently accessed data in the disk based databases such as Oracle, MySQL or Postgres.

Transcript of Csql Cache Presentation

  • 1. CSQL DATABASE CACHE Bijaya Kumar Sahu Database Developer Lakshya Solutions Pvt Ltd [email_address]

2. What Is Next

  • CSQL Cache Functionalities
  • CSQL Cache Configuration
  • Cache Tools

Information About : 3. What is CSQL Cache ? CSQL Cache isaclientsidecaching mechanismforany disk-based databasewhichincreasethethroughput of existing applications withoutrequiring any application changes. 4. CSQL Cache Functionalities

  • Updateable Cache Tables
  • Bi-Directional Updates
  • Synchronous and Asynchronous update propagation

Cont 5. CSQL Cache Functionalities

  • Partial cache Updates
  • Multiple cache granularity
  • Recovery for cached tables

Cont 6. CSQL Cache Functionalities

  • Tools to validate the coherence of cache
  • Transparent access to non-cached tables
  • Horizontally Scalable
  • Transparent Fail over

7. CSQL Cache Configuration

  • DSN

For CSQL Cache Configuration , Following flag need to be set which is present in csql.conf file. 8. Unidirectional Cache Configuration

  • CACHE_TABLE = true
  • CACHE_ID = 1
  • DSN = *

For Unidirectional Caching,Set flags as below Cont 9. Unidirectional Cache Configuration

  • For Unidirectional Caching, Be sure that
  • CSQL server and target database is running.
  • Isql tool for target database working properly.
  • Use cache tool to cache table to Cache node.

10. Bi-Directional Cache ConfigurationFor Bi-Directional Caching,Set flags as below

  • CACHE_TABLE = true
  • CACHE_ID = 1
  • DSN = *

Cont *For MySql := myodbc3, For Postgres : = psqletc.**By default path /tmp/csql/csqltable.conf 11. Bi-Directional Cache ConfigurationCreate log table in target database. For MySql : create table csql_log_int ( tablename char(64), pkid int, operation int , cacheid int, id int not null unique auto_increment) engine=innodb ; For Postgres : create table csql_log_int( tablename varchar(64), pkid int, operation int,cacheid int); alter table csql_log_int add id serial; Cont 12. Bi-Directional Cache Configuration

  • For Bi-directional Caching,
  • Run Trigger on key field of cached table.
  • Configure Isql tool for target database
  • Be sure CSQL server and target database server are running
  • Use cache tool to cache table to Cache node.

13. Multiple Cache Node Configuration

  • For Multiple Cache Node Configuration
  • Change CACHE_ID in the csql.conf file as unique id for different cache
  • node.
  • Configure as per Bi-directional Cache Node.
  • Be sure CSQL server in each node and target database server are running.
  • Use cache tool to cache table into each Cache Node .
  • Make appropriate changes in trigger file.

14. Cache Tools CSQL Cache have following Cache tools.

  • cachetable
  • cacheverify

Cont 15. Cache Tools ( cachetable )

  • Full Caching
  • Partial Caching ( Record based & Field based )
  • Caching with Direct Updates

CSQL supports three ways of caching mode Cont To cache table from target database to cache node. 16. Cache Tools ( cachetable ) Usage cachetable[-U username] [-P password] -ttablename[-D]-c "condition"-f"selectedfield names" -p fieldname[-R][-s] [-r] username -> username to connect with csql. password -> password for the above username to connect with csql. tablename ->table name to be cached in csql from target db. Cont 17. Cache Tools ( cachetable ) fieldname ->field name to be specified for the bidirectional cachingon which trigger to be run . R -> Recover all cached tables from the target database. s -> Load only the records from target db. Assumes table isalready created in csql r -> Reload the table. get the latest image of table from target db Cont 18. Cache Tools ( cachetable ) u -> Unload the table. if used with -s option, removes onlyrecords and preserves the schema D -> Enable direct option. For any non select SQL statementdirectly interact with target database. no option ->Get table definition and records from target db andcreate in csql. 19. Cache Tools ( cacheverify ) Usage cacheverify[-U username] [-P password] -t tablename [-p] [-f] username -> username to connect with csql. password -> password for the above username to connect with csql. Displaythe consistency inthespecifiedcachedtable in between cache node and target database. Cont 20. Cache Tools ( cacheverify ) tablename ->cached table name in csql from target db. p ->verification at primary key field level f ->verification at record level ?->help 21. For More Information Visit http://sourceforge.net/projects/csql/ http://www.csqlcache.com/ http://www.csqldb.com/