Unix Technical Forum

time consistant view

This is a discussion on time consistant view within the Informix forums, part of the Database Server Software category; --> Hi, informix 7.31fc6 Using Informix Enterprise Command Center SQL Editor 3.01.TC1 I want to query 2 tables, a history ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:36 AM
ECS
 
Posts: n/a
Default time consistant view

Hi,

informix 7.31fc6
Using Informix Enterprise Command Center SQL Editor 3.01.TC1
I want to query 2 tables, a history table and a planned table.
select * from history where date >= ("17/11/2005");
select * from planned where date >= ("17/11/2005");

Both selects take 5 minutes.
The application is continuously running, moving entries from planned to
history.
How to make sure that I don't miss any entries, or have some doubles?

TIA,

Daniel


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 09:36 AM
scottishpoet
 
Posts: n/a
Default Re: time consistant view

to ensure you don't miss any rows or have any duplicates you need to
lock both the lock the tables in exclusive mode before you do the
select

you may also want to consider

select * from history where date >=("17/11/05")
union
select * from planned where date >=("17/11/05")

but I am not sure if a row is moved from history top planned wheile
this select is running that you could guaranetee you didn't miss it



ECS wrote:
> Hi,
>
> informix 7.31fc6
> Using Informix Enterprise Command Center SQL Editor 3.01.TC1
> I want to query 2 tables, a history table and a planned table.
> select * from history where date >= ("17/11/2005");
> select * from planned where date >= ("17/11/2005");
>
> Both selects take 5 minutes.
> The application is continuously running, moving entries from planned to
> history.
> How to make sure that I don't miss any entries, or have some doubles?
>
> TIA,
>
> Daniel


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 09:37 AM
ECS
 
Posts: n/a
Default Re: time consistant view

Thanks, this seems to work

"scottishpoet" <dryburghj@yahoo.com> schreef in bericht
news:1132229696.669169.116400@f14g2000cwb.googlegr oups.com...
> to ensure you don't miss any rows or have any duplicates you need to
> lock both the lock the tables in exclusive mode before you do the
> select
>
> you may also want to consider
>
> select * from history where date >=("17/11/05")
> union
> select * from planned where date >=("17/11/05")
>
> but I am not sure if a row is moved from history top planned wheile
> this select is running that you could guaranetee you didn't miss it
>
>
>
> ECS wrote:
>> Hi,
>>
>> informix 7.31fc6
>> Using Informix Enterprise Command Center SQL Editor 3.01.TC1
>> I want to query 2 tables, a history table and a planned table.
>> select * from history where date >= ("17/11/2005");
>> select * from planned where date >= ("17/11/2005");
>>
>> Both selects take 5 minutes.
>> The application is continuously running, moving entries from planned to
>> history.
>> How to make sure that I don't miss any entries, or have some doubles?
>>
>> TIA,
>>
>> Daniel

>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com