Re: [SQL] Problem with query on history table

2006-03-01 Thread Andreas Joseph Krogh
On Wednesday 01 March 2006 23:19, Jim C. Nasby wrote: > Probably the easiest way is to switch to using table partitioning and > switch to using start_timestamp and end_timestamp, so that when you > modify a row you update the old one setting end_timestamp to now() and > insert the new row (all with

Re: [SQL] Problem with query on history table

2006-03-01 Thread Jim C. Nasby
Probably the easiest way is to switch to using table partitioning and switch to using start_timestamp and end_timestamp, so that when you modify a row you update the old one setting end_timestamp to now() and insert the new row (all within one transaction). There are other ways to do it, but they'

[SQL] Problem with query on history table

2006-02-26 Thread Andreas Joseph Krogh
Hi all! I don't know if there's a standard solution to the kind of problem I'm trying to solve, but I will appreciate your thougts(and maybe solution:) on this problem of mine: I have 2 tables: hist and curr which hold numbers for "history-data" and "current-data" respectivly. Here is a simpli

Re: [SQL] Problem with query

2003-01-28 Thread Josh Berkus
Ricardo, For future notice, there is another mailing list, PGSQL-PERFORMANCE, devoted to questions like yours. > select * from llamada where fecha='20030127' and tipo=1 and tiempo>0 > and gwdes like '64.7.127.14%' order by hora desc; > > It's very slow, it takes approximately 6 minutes to show m

Re: [SQL] Problem with query

2003-01-28 Thread Tom Lane
=?iso-8859-1?B?UmljYXJkbyBKYXZpZXIgQXJhbmliYXIgTGXzbg==?= <[EMAIL PROTECTED]> writes: > I used PostgreSQL 7.0.3 Please consider upgrading to something more recent. 7.0 predates a lot of work we've done on query optimization ... regards, tom lane ---

[SQL] Problem with query

2003-01-28 Thread Ricardo Javier Aranibar León
Hi, I don't know what happend when I execute this query? select * from llamada where fecha='20030127' and tipo=1 and tiempo>0 and gwdes like '64.7.127.14%' order by hora desc; It's very slow, it takes approximately 6 minutes to show me the results. I saw that it's happend when I execute this t

[SQL] problem with query

2002-09-19 Thread Ricardo Javier Aranibar León
Hi list, First sorry if this message arrive in your box mail twice, I need your colaboration,I like a table or view with this information from 2 tables "ticket" and "orden_respuesta". Note, that the tti (TTI0208) doesn't have links to "numorden" in the table orden_respuesta, if someone can

[SQL] problem with query

2002-09-19 Thread Ricardo Javier Aranibar León
Hi list, I need your help, I need a table or view with this information that show down,I have two tables "ticket" and "orden_respuesta" and I like this table. Note, that some tti for example (TTI0208) of ticket it isn't in the table orden_respuesta, if somone can help me i will thank full