Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable use of 'unset' values in prepared statements by default #66

Open
penberg opened this issue Sep 11, 2018 · 3 comments
Open

Enable use of 'unset' values in prepared statements by default #66

penberg opened this issue Sep 11, 2018 · 3 comments

Comments

@penberg
Copy link
Contributor

penberg commented Sep 11, 2018

We have support for the use of 'unset' values to reduce the number of prepared statements as of commit b432a08. However, user needs to explicitly enable that with the -u command line option, which they will easily forget to do.

We should make this enabled by default just like we do for prepared statements and batching since commit b382110. @haaawk did want us to check the performance impact of 'unset' before we do that, though.

@haaawk
Copy link
Contributor

haaawk commented Sep 11, 2018

It would probably be good as the default option should be the one that performs better. I won't insist though :)

@penberg
Copy link
Contributor Author

penberg commented Sep 11, 2018

@haaawk No, I think it's a reasonable requirement before defaulting to the new option.

@haaawk
Copy link
Contributor

haaawk commented Sep 21, 2018

@penberg @elcallio I would wait with enabling this by default. I was testing sstable loader with data generated by cassandra stress. Default schema is:

CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;

CREATE TABLE keyspace1.counter1 (
key blob,
column1 text,
"C0" counter static,
"C1" counter static,
"C2" counter static,
"C3" counter static,
"C4" counter static,
value counter,
PRIMARY KEY (key, column1)
) WITH COMPACT STORAGE
AND CLUSTERING ORDER BY (column1 ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'enabled': 'false'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';

CREATE TABLE keyspace1.standard1 (
key blob PRIMARY KEY,
"C0" blob,
"C1" blob,
"C2" blob,
"C3" blob,
"C4" blob
) WITH COMPACT STORAGE
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'enabled': 'false'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';

and running sstable loader like this: ./bin/sstableloader -u -d 127.0.0.1 /home/haaawk/.ccm/loader-1/node1/data0/keyspace1/standard1-c17511f0bb2111e8ac3f47eff2803657/

generates lots of errors:

com.datastax.driver.core.exceptions.InvalidQueryException: Unknown identifier column1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants