表大小在增长。性能技术是什么? - 面试问题 [英] Table size growing .what are performance techniques? - Interview questions

查看:65
本文介绍了表大小在增长。性能技术是什么? - 面试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在面试中遇到的问题很少,每次我都在讲述一些事情,但面试官期待更多的事情。所以我想知道来自专家的一些可能的答案



1.有一个表继续增长(假设表有1000万条记录),以便一些简单的连接选择查询的性能以前它过去需要10分钟才能输出。现在需要45分钟。



问题是

如何改进性能是什么?有什么可能吗?

你需要索引重建还是重组?

在这种情况下分区表会有用吗?

假设我有where子句,其中column没有任何索引。你如何实现性能?(他不期望在这个列上创建非聚集索引)



在我的所有采访中,我都面临着这些问题tions。我知道代码项目是获取这些问题的更多信息的正确位置。所以我发布这个问题,它将帮助我和其他人。



先谢谢

Hi Guys,

I am facing few questions in interview,every time i am telling something but interviewer expecting some thing more.So I want to get it know from Experts some possible answers

1.There is a table which is keep on growing (let's say table has 10 millions records) so that performance of some simple join select query degrading.Earlier it used to take 10 mins to give the output.Now it is taking 45 mins.

Question are
How you improve the performance?What are all the possibilities?
Do you need index rebuild or reorganize?
Does partitioning tables will help out in this case?
Suppose I have where clause ,where column doesn't have any index.How will you achieve performance?(he's not expecting creating non clustered index on this column)

Almost in all my interviews I faced these questions.I know code project is the right place to get more info on these questions.So I am posting this question and it will help me and to others.

Thanks In Advance

推荐答案

首先我不是专家但是我可以试试回答你的问题。



首先,如果你的表有10百万条记录(意味着1 Cr行),任何选择查询都不应该花费10分钟,按照我的认为超过5秒的查询需要优化,不管表中没有行。



首先,我不明白为什么这些人接受采访以及他们希望回答的内容。他们只是提出一个或两个陈述中无法回答的问题,这些问题完全是基于场景的问题,您的场景和场景可能完全不同。即使我已经进行了采访,我也聘请了非常好的人,我看到的只是逻辑构建技能和他们的方法就是这样。他们可以很容易地学习的过程。



现在回答你在面试中被问过的问题。以下答案最适合Mysql。



如何提高性能?有什么可能性?

是的,我们肯定可以提高性能,只要提供给予的领域是什么。我们可以添加索引,我们可以创建汇总表。



您是否需要重建索引或重新组织?

是的,当然索引需要重新组织。



在这种情况下,分区表会有用吗?

可以是也可以不是。再次依赖于场景。



假设我有where子句,其中列没有任何索引。你如何实现性能?(他不期待创建这一栏上的非聚集索引)

我不这么认为,这是一个正确的问题
First of all I am not an expert but yes I can try to answer your question.

Very first thing if your table has 10 millions of record(means 1 Cr rows), any select query should not take 10 mins, As per my thinking a query which is taking more than 5 sec needs to optimize, irrespective of what no of rows that table has.

First of all, I do not understand that why these people take interviews and what they expect to answer. They simply ask question which can not be answered in one or two statements and these are completely scenario based question, where your scenario and their scenario can be totally different. Even I have conducted interviews and I have hired very nice people, what I see is just the logic building skill and their approach that's it. Process they can learn very easily.

Now coming to the question that you have been asked in your interviews. Below answers can be best fit with Mysql.

How you improve the performance?What are all the possibilities?
Yes, definitely we can improve the performance, provided that what is the field given to play. We can add indexes, we can create summary tables.

Do you need index rebuild or reorganize?
Yes, of course indexing needs to reorganize.

Does partitioning tables will help out in this case?
Can be or can be not. Again depend on scenario.

Suppose I have where clause ,where column doesn't have any index.How will you achieve performance?(he's not expecting creating non clustered index on this column)
I don't think so, it is a right question


这篇关于表大小在增长。性能技术是什么? - 面试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆