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

VARBINARY vs NVARCHAR (SQLStore) #1373

Closed
mwjames opened this issue Jan 14, 2016 · 1 comment
Closed

VARBINARY vs NVARCHAR (SQLStore) #1373

mwjames opened this issue Jan 14, 2016 · 1 comment

Comments

@mwjames
Copy link
Contributor

mwjames commented Jan 14, 2016

MW defines [0]

page_id        INT          NOT NULL  PRIMARY KEY IDENTITY(0,1),
page_namespace INT          NOT NULL,
page_title     NVARCHAR(255)  NOT NULL,

SMW uses [1]

$wgDBtype == 'postgres' ? 'TEXT' : 'VARBINARY(255)'; // like page_title in MW page table

What are the performance implications NVARCHAR (unicode storage) vs. binary storage (VARBINARY)?

refs #1184

[0] https://github.com/wikimedia/mediawiki/blob/68df6447ff3ec8c9d99469a83492e70e5380aebb/maintenance/mssql/tables.sql#L112-L113
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/storage/SMW_SQLHelpers.php#L35

@mwjames
Copy link
Contributor Author

mwjames commented Sep 1, 2018

What are the performance implications NVARCHAR (unicode storage) vs. binary storage (VARBINARY)?

Not sure.

Given that NVARCHAR is only used in connection with MSSQL in MediaWiki [0] and we do not support MSSQL it seems discussing such change has not immediate predictable merit without an overwhelming performance benefit and as per above couldn't be quantified therefore closing this issue.

[0] https://github.com/wikimedia/mediawiki/search?p=2&q=NVARCHAR&unscoped_q=NVARCHAR

@mwjames mwjames closed this as completed Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants