Adapting SQL Queries-opracowanie

Nasza ocena:

3
Wyświetleń: 392
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Adapting SQL Queries-opracowanie - strona 1

Fragment notatki:

Adapting SQL Queries
The types of queries that are most suited to the simple GET request style are those with a single
clause, or a set of AND conditions, in the WHERE clause:
SQL:
select col from tbl where key = 'key_value';
memcached:
GET key_value
SQL:
select col from tbl where col1 = val1 and col2 = val2 and col3 = val3;
memcached:
# Since you must always know these 3 values to look up the key,
# combine them into a unique string and use that as the key
# for all ADD, SET, and GET operations.
key_value = val1 + ":" + val2 + ":" + val3
GET key_value
... zobacz całą notatkę

Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz