Subject | Re: 1.5.3 SS: need to run long-running queries with low prio - how? |
---|---|
Author | Ali Gökçen |
Post date | 2006-03-12T13:01:33Z |
Hi Kjell,
1- you can write an SP and put some command that makes CPU busy.
for example:
loop:
fetch row
while somecondition do dummycpuALUcalculation
insert row
continue
Note: create your index when you create your table, not after bulk
insert becuase of index building will does natural scan at crazy
speed. This causes DISK I/O bottleneck and increases respons time of
server to users. Yup, your bulk insert will be more slow, but as you
know there is only one timeline and we must to share it with
balanced.
2- you can write a dummy UDF to do sleep-pill effect for releated
thread, with low level system(win32) api calls.
Ali
--- In firebird-support@yahoogroups.com, Kjell Rilbe
<kjell.rilbe@...> wrote:
1- you can write an SP and put some command that makes CPU busy.
for example:
loop:
fetch row
while somecondition do dummycpuALUcalculation
insert row
continue
Note: create your index when you create your table, not after bulk
insert becuase of index building will does natural scan at crazy
speed. This causes DISK I/O bottleneck and increases respons time of
server to users. Yup, your bulk insert will be more slow, but as you
know there is only one timeline and we must to share it with
balanced.
2- you can write a dummy UDF to do sleep-pill effect for releated
thread, with low level system(win32) api calls.
Ali
--- In firebird-support@yahoogroups.com, Kjell Rilbe
<kjell.rilbe@...> wrote:
>million
> Hi,
>
> I've got a production database in FB 1.5.3. It contains about 1
> records in one table. These are fetched from an external sourcethat's
> updated every two weeks. After each external update I need toupdate my
> production table. For this purpose I actually have two productiontables
> and use the following process:total).
>
> 1. Production system uses table 1.
>
> 2. Drop table 2 and recreate it.
>
> 3. Fill table 2 using three long-running queries (about 1 hour in
>sure
> 4. Index table 2. Takes about half an hour.
>
> 5. Switch production system to use table 2.
>
> I need the process in steps 2-4 to run with low priority to make
> the production system is not impaired - this is a web applicationand
> requires good response times.switch to
>
> What is the best way to achieve this? It would be possible to
> classic, if that's any help. The server that hosts both DB, webserver
> and web application has 1 Gbyte RAM, and a single harddisk(actually a
> mirrored pair). Windows 2003 server.
>
> Thanks,
> Kjell
> --
> --------------------------------------
> Kjell Rilbe
> Adressmarknaden AM AB
> E-post: kjell.rilbe@...
> Telefon: 08-761 06 55
> Mobil: 0733-44 24 64
>