首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于19列性能的mysql查询

基于19列性能的mysql查询
EN

Stack Overflow用户
提问于 2019-02-03 14:44:07
回答 1查看 27关注 0票数 0

我是一个新手,当我来到mysql时,我一直在使用firebase数据库,它不是一个关系数据库,但对于mysql,我在查询列(过滤)方面有一个性能问题。我正在做这个汽车应用程序,大约有19个身份

代码语言:javascript
复制
ID  type    model   seri    marka   year bodytype   feul    Gear    picurl  km  color   warranty    from-who    Exchangable Conidition  city    neibourhood useride 

过滤器将如下所示

代码语言:javascript
复制
example: type = 2 and model = 3 and seri = 4 and marka =3 and year = 94 and bodytype = 5 and feul = 2 and gear = 3 and km >= 1000 and warrant = 4 and from-who = 4 and color = 3  and exchangable = 2 and conditition = 2 and city = 3 and neibourhood = 2

哪个更适合过滤:一个表有19列,或者2-5个索引表基于ID连接,因为用户将在执行查询注释之前使用过滤器(请注意,预计表中的大量数据将低于(10.000行),因为创建4周后每行都会自行删除)

EN

回答 1

Stack Overflow用户

发布于 2019-02-03 15:19:48

您可以使用以下方式运行查询:

代码语言:javascript
复制
SELECT * FROM cars WHERE  type = 2 and model = 3 and seri = 4 and marka = 3 and year = 94 and bodytype = 5 and feul = 2 and gear = 3 and km >= 1000 and warrant = 4 and `from-who` = 4 and color = 3  and exchangable = 2 and conditition = 2 and city = 3 and neibourhood = 2 ;

如果你想为所有的表建立关系,你必须遵循

  • One to One
  • One to Many
  • 多对多
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54500594

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档