Hi,
I have a small theoretical issue.
I have one table, which is prettyu large. There is lot of evaluations
running on this table, that's why, each process need to wait for
another to be finished. Sometimes, for some critical functions, it
takes to long time.
I don't think that I can speed up processes, by changing the indexes on
the tables (to increase scan time for example), because this is
something what I was experimenting with already, and it was not enought
good.
My question is, will it improve performance, if I will create second
table, exactly like this one, and I will split some evaluations, that
the one, which defenately need to run on the source table will run on
the first one, and the second evaluations, will run on the other one.
To keep data consistance between this two tables, I was thinking baout
trigger on insert on the mother table, which will transport the data to
another one.
Second part is: to improve selects on the table, should I set indexes
with option of Fill factor as possible close to 100% or as possible
close to 0%. Or maybe should I set the pad index option?
What about clustered indexes. Is it better to use them if I would like
to increase performace for selects?
Thanks in advance
Mateusz 4 1608
For selects you should have your indexes as close to 100% as possible,
if this table is frequently modify make it around 80%-90%
Also did you check the fragmentation level of your table?
A lot of times this improves speed dramatically
run DBCC SHOWCONTIG ('YourTableName') and look at Scan Density, Avg.
Bytes Free per Page and Fragmentation Levels
If your density is low and/or fragmentation high run DBCC INDEXDEFRAG
(dbname,tablename,1)
Lookup DBCC SHOWCONTIG and DBCC INDEXDEFRAG in Books online
Have you tried horizontal partitioning? This might benefit you http://sqlservercode.blogspot.com/
On 27 Sep 2005 09:35:55 -0700, Matik wrote: Hi,
I have a small theoretical issue. I have one table, which is prettyu large. There is lot of evaluations running on this table, that's why, each process need to wait for another to be finished. Sometimes, for some critical functions, it takes to long time.
Hi Mateusz,
If the processes are only reading the data without modifying it, then
there is no need to wait. They can run concurrently.
My question is, will it improve performance, if I will create second table, exactly like this one, and I will split some evaluations, that the one, which defenately need to run on the source table will run on the first one, and the second evaluations, will run on the other one.
I doubt it. SQL Server doesn't know that the data in both tables is
equal. So if one query reads row #12345 from table #1, and the other
query reads row #12345 from table #2, SQL Server will fetch the
corresponding data from both tables from disk to cache. In short, you
are effectively halving the amount of cache SQL Server can use for these
queries. I expect performance to decrease.
To keep data consistance between this two tables, I was thinking baout trigger on insert on the mother table, which will transport the data to another one.
And this will hurt performance even more. The speed of inserts will slow
down because the trigger has to be executed. As a result, locks on the
main table will live longer, keeping other queries blocked for longer
amounts of time. And the second table will be blocked as well.
Since the data is apparently updated while you are querying it, you
might find benefit in a variation on your idea: make a copy of the
table, but don't use triggers to copy over all modifications. Instead,
set up a job that will periodically synchronise the data. Now make sure
that all queries that don't need up-to-the-second precision are used on
the copy table (that is only update periodically).
Second part is: to improve selects on the table, should I set indexes with option of Fill factor as possible close to 100% or as possible close to 0%. Or maybe should I set the pad index option?
What about clustered indexes. Is it better to use them if I would like to increase performace for selects?
There is no magic bullet here. Each problem needs it's own solution,
that's why there are so many options.
Read more about performance at www.sqlserver-performance.com, or post
here with full details of your tables, indexes, queries and execution
plans for more advise.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
On Tue, 27 Sep 2005 23:30:53 +0200, Hugo Kornelis wrote: Read more about performance at www.sqlserver-performance.com
I goofed when typing that URL from memory. The correct URL is http://www.sql-server-performance.co...erformance.asp.
Unfortunately, the site is revamped since my last visit. The content is
still there, but buried in lots of irritating advertising.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Thanks Hugo and SQL :)
I see, that there is no better way, like just experiment with this
indexes, and maybe modify some statements. During past two days, I've
did that, and now is much better.
Anyway, the structure of the tables is bad, so there is also no
possibility to use better indexing.
I've one more question, if we are already by the topic of indexes. My
question is about the phisical memory the indexes are using.
When I've made all tables empty, truncated db, shrinkt aso. but the
file size is still a little to big. I know, that the indexes are taking
also memory to be stored (specialy clustered), but, after I've removed
all data, the indexes should be also cleared, right? Or maybe I need to
rebuild them?
Gratings
Mateusz This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim Garrison |
last post by:
Scenario:
1) Create a GLOBAL TEMPORARY table and populate it with
one (1) row.
2) Join that table to another with about 1 million rows.
The join condition selects a few hundred rows.
...
|
by: Andy Tran |
last post by:
I built a system using mysql innodb to archive SMS messages but the
innodb databases are not keeping up with the number of SMS messages
coming in. I'm looking for performance of 200 msgs/sec where...
|
by: Steve_CA |
last post by:
Hello all,
I've been recruited to assist in diagnosing and fixing a performance problem
on an application we have running on SQL Server 7.
The application itself is third party software, so we...
|
by: Scott |
last post by:
I have a customer that had developed an Access97 application to track
their business information. The application grew significantly and
they used the Upsizing Wizard to move the tables to SQL...
|
by: bhbgroup |
last post by:
I have a query on one large table. I only add one condition, i.e. a
date (the SQL reads like 'where date > parameterdate'.
This query is rather quick if 'parameterdate' is either explicitly...
|
by: Bob Alston |
last post by:
Most of my Access database implementations have been fairly small in
terms of data volume and number of concurrent users. So far I haven't
had performance issues to worry about. <knock on wood>
...
|
by: Bob Alston |
last post by:
Some more, rather specific Access performance questions. IN a split
front-end & back-end Access/Jet ONLY LAN situation, and with all query
criteria fields and join fields indexed:
1. Is is...
|
by: HC |
last post by:
Hello, all, I started out thinking my problems were elsewhere but as I
have worked through this I have isolated my problem, currently, as a
difference between MSDE and SQL Express 2005 (I'll just...
|
by: jsimone |
last post by:
This question is about DB2 table design and performance.
We are using DB2 UDB Enterprise 8.2 on Linux.
We have 6 tables in a parent-child (one-to-many) relationship with each other. Each...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| |