有人建议我最好用浮点子作为一张桌子的主要钥匙, 而不是使用BIGINT。
I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...
有人建议我最好用浮点子作为一张桌子的主要钥匙, 而不是使用BIGINT。
考虑因素:
您为什么需要一个 PK 的浮标? 您需要3, 1234235234534 这样的值来识别您的行吗?
请注意,如果你真的漂浮 a=1f 和漂浮 b=1f 它们都是相同的权利吗?
但是,如果(a==b)由于浮标不准确,则可能不属实。
为何不对主密钥使用大数据类型 :
尽量缩小索引的“ 宽度 ” 。 这将缩小索引的大小, 并减少读取索引所需的磁盘 I/ O 读数, 提高性能 。
如果可能的话, 请尝试在有整数值而不是字符的列上创建索引。 整数值比字符值少。
在主键上不要使用FLOAT或真实数据类型,因为它们会增加不必要的间接费用,并可能损害性能。
窄列上的索引比宽列上的索引要好。 越小的索引, SQL 服务器的条目越多,数据页面上就可以适应的数据页,这反过来又会减少访问数据所需的I/O数量。
减少键的大小,从而在加入过程中减少读I/O,提高总体业绩。
I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...
I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域
We have a restaurant table that has lat-long data for each row. We need to write a query that performs a search to find all restaurants within the provided radius e.g. 1 mile, 5 miles etc. We have ...
What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2
I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...
we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...
I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...
I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...