Grokbase
x

Alexandre Leclerc (alexandre.le...@gmail.com)

Profile | Posts (23)

User Information

Display Name:Alexandre Leclerc
Partial Email Address:alexandre.le...@gmail.com
Posts:
23 total
5 in PostgreSQL - Admin
2 in PostgreSQL - Advocacy
16 in PostgreSQL - Performance

5 Most Recent

All Posts
1) Alexandre Leclerc Ordering problem with varchar (DESC) - from general ml.
| +1 vote
Hi all, I don't want to double post, but I see nothing hapening in the general mailling list, so I...
PostgreSQL - Admin
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi all,

I don't want to double post, but I see nothing hapening in the general
mailling list, so I post here in case any one has an idea about what
is going on.

We have a column (varchar) that has plain text time and it is indexed.
When I do a query with the index, all the data is in the right order,
but when I user ORDER BY .. DESC, the order is messed up. Example:

By index 1: (date, time, data)
SELECT * from t1;
date (date type)  time (varchar)  data
2007-01-17         8h40           d1
2007-01-30         9h30           d2
2007-01-30        12h00           d3
2007-01-30        13h45           d4
2007-01-30        17h20           d5

SELECT * from t1 ORDER BY date, time DESC;
date (date type)  time (varchar)  data
2007-01-30         9h30           d2
2007-01-30        17h20           d5
2007-01-30        13h45           d4
2007-01-30        12h00           d3
2007-01-17         8h40           d1

I don't know why, this is like if the 'time' varchar was trimmed then
used for the ordering.

How can I fix that so that the result is exactly like the first one but
perfectly reversed in it's order?

Best regards.

--
Alexandre Leclerc
2) Alexandre Leclerc Re: Slow delete/insert.
| +1 vote
By the way, I think the "performance" mailling list would be the ideal place to post you question...
PostgreSQL - Admin
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
By the way, I think the "performance" mailling list would be the ideal
place to post you question since it is all about optimisation (and not
management).

Best regards.

--
Alexandre Leclerc
3) Alexandre Leclerc Re: Slow delete/insert.
| +1 vote
2006/8/24, Thor Tall <tall_thor@yahoo.com>: /Usually/, they are always called internally if not by...
PostgreSQL - Admin
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
2006/8/24, Thor Tall <tall_thor@yahoo.com>:
> The messages are split on the client side and PQexec
> are called with INSERT/DELETE statements.
> I have seen that I could use PQprepare and
> PQexecPrepared but I doubt that it would help a lot to
> use those functions?

/Usually/, they are always called internally if not by the coder; it
is good practice to call them. It does optimize the speed.

--
Alexandre Leclerc
4) Alexandre Leclerc Re: Slow delete/insert.
| +1 vote
All this is prety straight forward. As for the transaction you are crating, is the process of...
PostgreSQL - Admin
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
All this is prety straight forward.

As for the transaction you are crating, is the process of 'split
message' actually do on the DB side or are you doing this process on
you side? Maybe this is the actual work of splitting the message by
the DB that is very slow.

/Maybe/ if you do this data-processing on your side, then sending that
to the DB will save you time. If you really want that job being done
on the server side, you could build yourself an extension module
adding a special function that you would call to do the job. Maybe you
could win couple cycles...

But all that could be confirmed or not by someone else which knows
more about PG internals.

Best regards.

--
Alexandre Leclerc
5) Alexandre Leclerc moving /data folder (win32, pgsql 8.1.3)
| +1 vote
Hi all, I tried to "move" the /data folder to another HD. The service refuse to start after that...
PostgreSQL - Admin
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi all,

I tried to "move" the /data folder to another HD. The service refuse
to start after that and does not raise any errors.

- Stop service
- Copy /Program Files/PostgreSQl/8.1/data folder to, let say, d:/data
- Changed /Program Files/PostgreSQl/8.1/data/postgresql.conf:
data_directory =3D 'd:/data/'
- Started service, but will stop without any error message

* Under XP home; I cant' tell about the security params of the files
since it looks like in xphome I can't see them. But a copy paste
should leave the things alright.
* No error in windows logs... for what it worth any-way.

I don't know what I'm missing.

Regards.

--
Alexandre Leclerc

spacer
Profile | Posts (23)
Home > People > Alexandre Leclerc