由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Help on Sql server huge table performance
相关主题
SQL Server Trigger on System Base Table or Catalog ViewHelp! A cluster method in SQL
SQL add some columns into a table from another table (转载SQL find distinct values in large table
MS T-SQL 问题SQL Server stupid questions
How to handle inserting value to Identity column in sql server 2005SQL help.
Trigger questions问一个SQL Server的问题
How to replace 0 with empty?urgent help! insert value into table
How to split a column into several rows?a simple question about T-SQL
question: copy first N rows from table B to table A (DB2)Problem when using SQL " Insert...." to AutoNumber.
相关话题的讨论汇总
话题: table话题: report话题: insert话题: sql话题: rows
进入Database版参与讨论
1 (共1页)
m******y
发帖数: 588
1
我们有些巨大无比的report table, 每个table有200多个columns, 所有run同样的
report的用户share同一个report table, 用session identifier区分。 有的user不用
filter, 可以generate出来half million records and insert into report table,
有的只有几千几百rows. 因为有很多的insert and update, 所以report table 没有任
何index. 现在问题是:
1 有大的insert 和 update 非常慢。
2 用户之间影响非常大。 如果一个用户report 结果只有几百rows, but another
user has over half million records generated and inserted in the same table,
then 那个用户即使只有几百rows, 做insert, update 也无比的慢。
我现在没法改table structure和logic or hardware, 请
x***e
发帖数: 2449
2
serious.
上中下三策。
上中已经被你排除了。
now, you need some serious codings and configurations to do.
idea 1) use temp table.
basically, you wanna create a view, including the report table and at least
a temp table.
when people do insert, always insert to the empty temp table first.
then you will get the row count, if the row count is small,
then insert/update it to the report table, if big, danamically create a new
temp table,
and include the 3 table into the view, so the table list in the view grows,
instea

【在 m******y 的大作中提到】
: 我们有些巨大无比的report table, 每个table有200多个columns, 所有run同样的
: report的用户share同一个report table, 用session identifier区分。 有的user不用
: filter, 可以generate出来half million records and insert into report table,
: 有的只有几千几百rows. 因为有很多的insert and update, 所以report table 没有任
: 何index. 现在问题是:
: 1 有大的insert 和 update 非常慢。
: 2 用户之间影响非常大。 如果一个用户report 结果只有几百rows, but another
: user has over half million records generated and inserted in the same table,
: then 那个用户即使只有几百rows, 做insert, update 也无比的慢。
: 我现在没法改table structure和logic or hardware, 请

m******y
发帖数: 588
3
Thanks for the reply. But it seems both solutions will involve kind of
report app code changing. :(
x***e
发帖数: 2449
4
I still think the best/easiest way is to change table structure and/or add
hardware

【在 m******y 的大作中提到】
: Thanks for the reply. But it seems both solutions will involve kind of
: report app code changing. :(

t*****g
发帖数: 1275
5
啥database?支持dirty read么?

table,

【在 m******y 的大作中提到】
: 我们有些巨大无比的report table, 每个table有200多个columns, 所有run同样的
: report的用户share同一个report table, 用session identifier区分。 有的user不用
: filter, 可以generate出来half million records and insert into report table,
: 有的只有几千几百rows. 因为有很多的insert and update, 所以report table 没有任
: 何index. 现在问题是:
: 1 有大的insert 和 update 非常慢。
: 2 用户之间影响非常大。 如果一个用户report 结果只有几百rows, but another
: user has over half million records generated and inserted in the same table,
: then 那个用户即使只有几百rows, 做insert, update 也无比的慢。
: 我现在没法改table structure和logic or hardware, 请

1 (共1页)
进入Database版参与讨论
相关主题
Problem when using SQL " Insert...." to AutoNumber.Trigger questions
SQL combine two columns from two different tables no shared (转载)How to replace 0 with empty?
a simple question about insertHow to split a column into several rows?
Table Merge (SQL Server)question: copy first N rows from table B to table A (DB2)
SQL Server Trigger on System Base Table or Catalog ViewHelp! A cluster method in SQL
SQL add some columns into a table from another table (转载SQL find distinct values in large table
MS T-SQL 问题SQL Server stupid questions
How to handle inserting value to Identity column in sql server 2005SQL help.
相关话题的讨论汇总
话题: table话题: report话题: insert话题: sql话题: rows