Well, im wondering if is possible using LIKE '%blah%', even better would be
upper/lower(string) like '%blah%',
Im not at work right now, i will try it latter and makes you know about
the results of using tsearch indexing.
Thanks a lot, man!
Gerardo
> On Tue, Mar 06, 2007 at 06:34:23PM -0300, Gera
I think the tables should contain 50k rows of record and it should be insert
7k rows per month. And the condition of the database is running, so it
should not change the tables to partitioning right now.
I am looking for some JOIN statement but still doesn't understand how to use
JOIN to replace
On Tue, Mar 06, 2007 at 06:34:23PM -0300, Gerardo Herzig wrote:
> Hi all, i have a large table with one varchar field, and im triyng to
> get information about what index should i use in order to using that
> index (if this is possible) for ~ searching, and/or using LIKE searching.
What sort of
Hi all, i have a large table with one varchar field, and im triyng to
get information about what index should i use in order to using that
index (if this is possible) for ~ searching, and/or using LIKE searching.
Thanks!
Gerardo
---(end of broadcast)
I did like this:
update base.destinationTable set MyCountField = MyCountField + 1 where
id = new.keyField_ID;
I think it works becouse my tests are ok.
My really thank you all.
Ezequias
2007/3/6, Richard Huxton :
Ezequias Rodrigues da Rocha wrote:
> Thank you but I must inc an specific row. H
On Tue, 6 Mar 2007, Steve Midgley wrote:
Hi Peter,
:)
All my Pg code is written via (or handed to) an abstraction layer, and I
actually write no functions or stored procedures at all. I write using Rails,
so in this case it's a Ruby library called ActiveRecord which has a Postgres
module th
Ezequias Rodrigues da Rocha wrote:
Thank you but I must inc an specific row. How to do that ?
I'm not sure I understand. A row in a different table?
...
BEGIN
UPDATE some_table SET counter = counter + 1;
END;
...
--
Richard Huxton
Archonet Ltd
---(end of broad
Am Dienstag, 6. März 2007 16:03 schrieb Florian Weimer:
> a | b | c
> ---+---+---
> 5 | 6 | 7
> 2 | 3 | 4
> 1 | 2 | 3
Hi,
couldn't you accomplish this by:
select distinct on (a) * from tablename order by a;
here:
create table tab (a int,b int,c int);
insert into tab values (1,2,3);
insert
Now that's ok. Thank you all. I just thought that there was a function
to inc an integer field in postgresql.
Best regards
Ezequias
2007/3/6, Andreas Kretschmer <[EMAIL PROTECTED]>:
Richard Broersma Jr <[EMAIL PROTECTED]> schrieb:
> --- Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
>
Richard Broersma Jr <[EMAIL PROTECTED]> schrieb:
> --- Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
>
> > Thank you but I must inc an specific row. How to do that ?
> >
>
> Does,
>
> UPDATE your_table
> SET your_row = your_row +1
> WHERE your_pkey = ;
>
> not do what you need?
I th
Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> schrieb:
> Thank you but I must inc an specific row. How to do that ?
Read the answer again.
Please, no silly TOFU (german synonym for text above, fullquote below).
> >> For example. I have a table with a field that on each update it
> >> incremen
Hi Peter,
:)
All my Pg code is written via (or handed to) an abstraction layer, and
I actually write no functions or stored procedures at all. I write
using Rails, so in this case it's a Ruby library called ActiveRecord
which has a Postgres module that allows me to talk via
"ActiveRecord-spe
--- Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
> Thank you but I must inc an specific row. How to do that ?
>
Does,
UPDATE your_table
SET your_row = your_row +1
WHERE your_pkey = ;
not do what you need?
Regards,
Richard Broersma Jr.
---(end of broadcast)
Thank you but I must inc an specific row. How to do that ?
Ezequias
2007/3/6, Richard Huxton :
Ezequias Rodrigues da Rocha wrote:
> Hi list,
>
> There is any function to increment with 1 some field.
>
> For example. I have a table with a field that on each update it
> incrementes a field that i
Ezequias Rodrigues da Rocha wrote:
Hi list,
There is any function to increment with 1 some field.
For example. I have a table with a field that on each update it
incrementes a field that is allways configured to 0 before the
starting of updates.
Something like:
CREATE FUNCTION my_autoinc() R
Hi list,
There is any function to increment with 1 some field.
For example. I have a table with a field that on each update it
incrementes a field that is allways configured to 0 before the
starting of updates.
Regards
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozil
On Tue, Mar 06, 2007 at 09:40:52AM -0500, Radhika Sambamurti wrote:
> But from the db point of view, is there a bigger performace hit when I
> query a view Vs a table or is there no difference.
It rather depends on your view definition. See the discussion of
views and, especially, the discussion
* Tom Lane:
> Florian Weimer <[EMAIL PROTECTED]> writes:
>> For each value in the first column, I need one (and only one) matching
>> row from the table. A possible solution is:
>
> SELECT DISTINCT ON would do it, if you don't mind a non-portable solution.
Cool, thanks a lot.
--
Florian Weimer
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
Hi list,
It is possible to retrieve the time of a SQL statement leads to
execute ? I would like to put in my application how much time each
operation leads to finish.
Any suggestion ?
--
Ezequias Rodrigues da Rocha
http://ezequi
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
Hi list,
It is possible to retrieve the time of a SQL statement leads to
execute ? I would like to put in my application how much time each
operation leads to finish.
Any suggestion ?
--
Ezequias Rodrigues da Rocha
http://ezequi
Florian Weimer <[EMAIL PROTECTED]> writes:
> For each value in the first column, I need one (and only one) matching
> row from the table. A possible solution is:
SELECT DISTINCT ON would do it, if you don't mind a non-portable solution.
regards, tom lane
Hi,
I have two tables which currently are being aggregated into a third table.
I am proposing eliminating or drastically shortening the 3rd aggregation
table, and instead just using a View.
Which brings me to the question, which is better? Reading from a table or
a view or is there a difference i
am Tue, dem 06.03.2007, um 16:03:36 +0100 mailte Florian Weimer folgendes:
> Is there a better way to implement this?
DISTINCT ON()
http://www.postgresql.org/docs/current/static/sql-select.html#SQL-DISTINCT
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (me
I've got the following table:
fweimer=> SELECT * FROM tab;
a | b | c
---+---+---
1 | 2 | 3
5 | 6 | 7
1 | 2 | 2
2 | 3 | 4
1 | 2 | 2
2 | 3 | 4
For each value in the first column, I need one (and only one) matching
row from the table. A possible solution is:
a | b | c
---+---+---
5 | 6 |
i figured it out
Set oRs = oConn.Execute("SELECT N_GEN FROM " & MyTable & " ORDER BY N_GEN::INT
DESC")
thanks to everyone
- Original Message -
From: Shavonne Marietta Wijesinghe
To: pgsql-sql@postgresql.org
Sent: Tuesday, March 06, 2007 3:32 PM
Subject: Re: [SQL] convert to
As Andreas already asked: do you really have a good reason to store numbers as
text
If so, show us some more information: table definition, some table data, a
complete (vb?) function/property get, ... anything that is directly involved.
>>> "Shavonne Marietta Wijesinghe" <[EMAIL PROTECTED]> 200
when i try the
set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC")
it returns 1 and for the rest i doens't change. alsways 10
:(
- Original Message -
From: Bart Degryse
To: pgsql-sql@postgresql.org
Sent: Tuesday, March 06, 2007 2:54 PM
Subject: Re:
EXPLAIN ANALYZE does give the query execution time at the end of its output.
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
EXPLAIN ANALYZE Is perfect but i have no idea of how to use it. My
resultset is retrieving my rows.
EXPLAIN ANALYZE is only for tuning purposes.
Read the manual
(http://www.postgresql.org/docs/8.1/interactive/sql-explain.html) to get more
insight
>>> "Ezequias Rodrigues da Rocha" <[EMAIL PROTECTED]> 2007-03-06 14:55 >>>
EXPLAIN ANALYZE Is perfect but i have no idea of how to use it. My
results
EXPLAIN ANALYZE Is perfect but i have no idea of how to use it. My
resultset is retrieving my rows.
Another question that cames with the Analyze. PgAdmin return the time
to retrieve the data or all time to fill the grid on the "SQL Editor".
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blo
am Tue, dem 06.03.2007, um 14:42:53 +0100 mailte Shavonne Marietta Wijesinghe
folgendes:
> Hello
>
> i have a column N_GEN in postgreSql defined as text. In this coloumn i insert
> a
> number 10
Why do you store numbers as text?
>
> N_GEN (text) = 10
>
>
> on error resume next
> Set o
I assume GetFieldValue is the name of a VB function or property get?
Try either
Set oRs = oConn.Execute("SELECT N_GEN::int FROM MyTable ORDER BY N_GEN DESC")
or
GetFieldValue = cint(oRs("N_GEN")) + 1
or
GetFieldValue = clng(oRs("N_GEN")) + 1
In the last two cases make sure that the funct
Assuming you're using stored procedures...
Start procedure with logging current time, name of procedure,...
Perform whatever must be performed
End procedure with logging current time, name of procedure,...
Query logging table to get time spent
Alternative, still assuming you're using stored proce
Did you try EXPLAIN ANALYZE ?
---
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 3/6/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
I preffer that the database give me this information. I don't know if
it is possible becouse if we retrieve many rows and if we want to put
this re
Hello
i have a column N_GEN in postgreSql defined as text. In this coloumn i insert a
number 10
N_GEN (text) = 10
on error resume next
Set oRs = oConn.Execute("SELECT N_GEN FROM MyTable ORDER BY N_GEN DESC")
If err <> 0 then 'If table not found
GetFieldValue = "1"
else
GetFieldVal
I preffer that the database give me this information. I don't know if
it is possible becouse if we retrieve many rows and if we want to put
this result in a new column the same time will be replicated many
times and consuming more processing.
Any other suggestion ?
Ezequias
2007/3/6, Bart Degrys
note the time just before your operation starts
note the time just after it ends
show timeafter - timebefore
>>> "Ezequias Rodrigues da Rocha" <[EMAIL PROTECTED]> 2007-03-06 14:20 >>>
Hi list,
It is possible to retrieve the time of a SQL statement leads to
execute ? I would like to put in my appl
Hi list,
It is possible to retrieve the time of a SQL statement leads to
execute ? I would like to put in my application how much time each
operation leads to finish.
Any suggestion ?
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mozilla Firefox:http://br.mozdev.org/fire
Steve Midgley wrote:
> my ISP that manages my Pg SQL server is (in my interests)
> concerned about installing anything non-standard (read: unstable)
> onto their server. I was able to get them to install your TSearch2
> b/c it's been proven many times, but I'm hesitant to even bring up
> Q3C since
39 matches
Mail list logo