首页 \ 问答 \ 数据类型限制是否会对数据库空间或性能产生影响?(Does data types limits have any effect on database space or performance?)

数据类型限制是否会对数据库空间或性能产生影响?(Does data types limits have any effect on database space or performance?)

我将字段定义为integer ,其他字段定义为numeric (8,4) ,而第一个为smallint ,第二个为numeric (3,4)所以我只是想知道我是否更改或减少了这些字段的数据类型限制是否会对数据库空间或性能产生影响?


I have fields defined as integer and other defined as numeric (8,4), while it is enough for the first to be smallint and the second to be numeric (3,4) so I am just curious to know if I changed or reduced the data type limits of these fields will have any effect on db space or performance ?


原文:https://stackoverflow.com/questions/20805783
更新时间:2024-01-19 17:01

最满意答案

你需要设置相对路径而不是绝对路径,就像这个没有斜线的htmltemplates

并尝试将任何文件添加到htmltemplate文件夹。 因为,如果此文件夹为空,IDE不会在target \ classes路径中创建文件夹htmltemplate

在运行应用程序之前,在“ 生成”>“生成项目”菜单项中创建项目。


I finally solved the issue by switching to Maven instead of using the built-in IntelliJ artifact builder. It works, but don't ask me why, I haven't the slightest.

相关问答

更多
  • 通过创建一个与test目录(!)平行的test test-resources目录,我设法让它更好地工作。 尽管如此,仍然看到间歇性的问题。 那些时候,可以打开IntelliJ项目设置并将测试资源定义为源代码 (Gradle项目将保持不变)。 必须是IntelliJ错误,因为我在Android Studio中经历了同样的事情。 编辑: 我找到了解决该问题的方法 。 在Gradle配置的末尾添加以下内容(并指定您的测试资源路径): task copyTestResources(type: Copy) { ...
  • 使用时 this.getClass().getResource("myFile.ext") getResource将尝试找到相对于该包的资源。 如果你使用: this.getClass().getResource("/myFile.ext") getResource将它视为绝对路径,只需像您所做的那样调用类加载器。 this.getClass().getClassLoader().getResource("myFile.ext") 您不能使用ClassLoader路径中的前导/ ClassLoader ...
  • TestGameTable.class.getResource("/unibo/lsb/res/dice.jpg"); 主要斜杠表示类路径的根 斜线而不是路径中的点 你可以直接在类上调用getResource() 。 TestGameTable.class.getResource("/unibo/lsb/res/dice.jpg"); leading slash to denote the root of the classpath slashes instead of dots in the path ...
  • 回答是否有任何缓存的问题。 我通过运行使用getResourceAsStream ClassLoader方法从磁盘连续加载文件的独立Java应用程序进一步调查了这一点。 我能够编辑文件,并且立即反映更改,即文件从磁盘重新加载而不进行缓存。 但是:我正在使用一些项目,其中包含几个相互依赖关系的maven模块和Web项目。 我使用IntelliJ作为我的IDE来编译和运行web项目。 我注意到上述似乎已经不再适用,原因是我正在加载的文件现在被烘烤成一个jar并且部署到依赖的Web项目中。 尝试更改目标文件夹中的 ...
  • 问题是ResourceFile.class.getResource("/")从仅包含jar的类路径运行时将返回null ,这是因为当某个东西不存在时, getResource返回null ,并且在由罐子,根目录不被认为是存在的(根据罐子的构建方式,其他目录可能存在也可能不存在)。 如果类路径包含目录,它可能实际上并不指向您期望的位置! 我想你正在寻找罐子的位置,你可以找到: ResourceFile.class.getProtectionDomain().getCodeSource().getLocatio ...
  • 你需要设置相对路径而不是绝对路径,就像这个没有斜线的htmltemplates 。 并尝试将任何文件添加到htmltemplate文件夹。 因为,如果此文件夹为空,IDE不会在target \ classes路径中创建文件夹htmltemplate 。 在运行应用程序之前,在“ 生成”>“生成项目”菜单项中创建项目。 I finally solved the issue by switching to Maven instead of using the built-in IntelliJ artifact ...
  • 这是文件的方法 这是既不能也不能将资源加载为文件的方法。 是不可能的。 资源不是文件,不存在于文件系统中。 您必须重新设计它以返回URL或InputStream,并且因为您可以直接从Class或ClassLoader获取它们,您实际上根本不需要该方法。 Here is the method that files Here is the method that neither does nor can load resources as Files. It is impossible. Resources a ...
  • 为了将模板加载为具有前缀路径的可选支持的类路径项,您应该使用ClassLoaderResourceResolver而不是ServletContextTemplateResolver (后者相对于Web应用程序上下文解析tempaltes,即在/ WEB-INF /目录下): @Bean public ServletContextTemplateResolver templateResolver() { ITemplateResolver templateResolver = new ClassLoa ...
  • 我认为你在这里采取了太多中间笨重的步骤,因为标准的Java API不允许你立即这样做。 我建议你使用IOUtils.copy来复制字节: try(InputStream resourceStream = getClass().getResourceAsStream("/files/myFile.exe"); FileOutputStream fos = new FileOutputStream("C:\\myFile.exe")) { IOUtils.copy(resourceStream, ...
  • craft.png必须放在src/main/resources ,否则根据Maven规则不会将其复制到类路径中。 有关详细信息,请参阅此答案 。 您的代码也应更改为: private String craft = "/craft.png"; 这是示例工作项目 。 craft.png must be placed into src/main/resources, otherwise it will be not copied to the classpath according to the Maven ru ...

相关文章

更多

最新问答

更多
  • 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
  • Java中的不可变类(Immutable class in Java)
  • 寻求多次出现的表达式(Seeking for more than one occurrence of an expression)
  • linux只知道文件名,不知道在哪个目录,怎么找到文件所在目录
  • Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
  • 懒惰地初始化AutoMapper(Lazily initializing AutoMapper)
  • 使用hasclass为多个div与一个按钮问题(using hasclass for multiple divs with one button Problems)
  • Windows Phone 7:检查资源是否存在(Windows Phone 7: Check If Resource Exists)
  • EXCEL VBA 基础教程下载
  • RoR - 邮件中的动态主体(部分)(RoR - Dynamic body (part) in mailer)
  • 无法在Google Script中返回2D数组?(Can not return 2D Array in Google Script?)
  • JAVA环境变量的设置和对path , classpth ,java_home设置作用和目的?
  • mysql 关于分组查询、时间条件查询
  • 如何使用PowerShell匹配运算符(How to use the PowerShell match operator)
  • Effective C ++,第三版:重载const函数(Effective C++, Third edition: Overloading const function)
  • 如何用DELPHI动态建立MYSQL的数据库和表? 请示出源代码。谢谢!
  • 带有简单redis应用程序的Node.js抛出“未处理的错误”(Node.js with simple redis application throwing 'unhandled error')
  • 使用前端框架带来哪些好处,相对于使用jquery
  • Ruby将字符串($ 100.99)转换为float或BigDecimal(Ruby convert string ($100.99) to float or BigDecimal)
  • 高考完可以去做些什么?注意什么?
  • 如何声明放在main之后的类模板?(How do I declare a class template that is placed after the main?)
  • 如何使用XSLT基于兄弟姐妹对元素进行分组(How to group elements based on their siblings using XSLT)
  • 在wordpress中的所有页面的标志(Logo in all pages in wordpress)
  • R:使用rollapply对列组进行求和的问题(R: Problems using rollapply to sum groups of columns)
  • Allauth不会保存其他字段(Allauth will not save additional fields)
  • python中使用sys模块中sys.exit()好像不能退出?
  • 将Int拆分为3个字节并返回C语言(Splitting an Int to 3 bytes and back in C)
  • 在SD / MMC中启用DDR会导致问题吗?(Enabling DDR in SD/MMC causes problems? CMD 11 gives a response but the voltage switch wont complete)
  • sed没有按预期工作,从字符串中间删除特殊字符(sed not working as expected, removing special character from middle of string)
  • 如何将字符串转换为Elixir中的函数(how to convert a string to a function in Elixir)