Re: Best way to delete time stamped data?
От | Rajesh Kumar Mallah |
---|---|
Тема | Re: Best way to delete time stamped data? |
Дата | |
Msg-id | 200305051526.21885.mallah@trade-india.com обсуждение исходный текст |
Ответ на | Re: Best way to delete time stamped data? (Josh Berkus <josh@agliodbs.com>) |
Ответы |
Re: Best way to delete time stamped data?
|
Список | pgsql-sql |
an index on age(date(trxdate)) would make it faster ? regds mallah. On Saturday 03 May 2003 4:49 am, Josh Berkus wrote: > Kyle, > > > DELETE FROM ONLY richtable WHERE trxdate < current_timestamp - interval > > '90 days'; > > > > This works great. But I was wondering if there is a better or more > > compact way to go about it. (this method feels "clunky" to me) > > More compact than that ?!?!?! > Maybe you should go into Perl, instead of SQL -- I think the one-liners > would suit you. > > You can use the age() function, but all that funciton does is the same > calculation you have above. -- Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.
В списке pgsql-sql по дате отправления: