[MonetDB-users] ENUM style table with JOIN versus automatically deduplicated VARCHAR
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, MonetDB 'deduplicates' strings, is there any benchmark that outlines the performance difference of an ENUM with a low number of (string)items versus the use of a VARCHAR field? The technical question would be; Is it more efficient to do: select * from my_table, my_enum where mytable.my_enum_id = my_enum.id and my_enum.name = 'Something'; or select * from my_table where my_enum_varchar = 'something'; I can imagine that the following would out perform a string comparison, but implies hardcoded values. select * from my_table, my_enum where mytable.my_enum_id = hardcoded; Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREKAAYFAk78fnkACgkQYH1+F2Rqwn3BUQCeOUtPIGzcHT1xpnsF4n78BQ/1 JWAAnjnzPeT8D7CtsjYgAiGg/WRIgNbQ =989f -----END PGP SIGNATURE-----
Hi, there is no such benchmark available. I doubt it would make a big difference. It might even be a little slower, because it increase the total memory footprint (e.g. the hashes needed) regards, Martin On 12/29/11 3:51 PM, Stefan de Konink wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Hi,
MonetDB 'deduplicates' strings, is there any benchmark that outlines the performance difference of an ENUM with a low number of (string)items versus the use of a VARCHAR field?
The technical question would be;
Is it more efficient to do:
select * from my_table, my_enum where mytable.my_enum_id = my_enum.id and my_enum.name = 'Something';
or
select * from my_table where my_enum_varchar = 'something';
I can imagine that the following would out perform a string comparison, but implies hardcoded values.
select * from my_table, my_enum where mytable.my_enum_id = hardcoded;
Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEAREKAAYFAk78fnkACgkQYH1+F2Rqwn3BUQCeOUtPIGzcHT1xpnsF4n78BQ/1 JWAAnjnzPeT8D7CtsjYgAiGg/WRIgNbQ =989f -----END PGP SIGNATURE-----
------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (2)
-
Martin Kersten
-
Stefan de Konink