Skip site navigation (1) Skip section navigation (2)

Re: PGAdmin - saving result sets from queries where one or more columns are of the type boolean

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: John Pagakis <thebfh(at)toolsmythe(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: PGAdmin - saving result sets from queries where one or more columns are of the type boolean
Date: 2011-04-17 13:17:05
Message-ID: 4DAAE851.2030500@lelarge.info (view raw or flat)
Thread:
Lists: pgadmin-support
Le 16/04/2011 21:19, John Pagakis a écrit :
> I've noticed this problem for a while, but haven't reported it.  Sorry.
> 
> If you run a query in PGAdmin saving the results to disk and that query
> selects one or more booleans it takes orders of magnitude longer for the
> result set to save to disk that it does if you do not select those columns
> in the query.
> 

Well, if you have less data, it's not surprising it's quicker to export.

> I've resorted to this work-around (when I remember it, and when I don't I
> curse and go get a snack <grin>):
> 
> Instead of:
> 
> SELECT 
>        col_a, 
>        col_b,
>        is_a_boolean, 
>        col_c 
> FROM 
>        baz;
> 
> If I do this:
> 
> SELECT
>        col_a, 
>        col_b,
>        CASE WHEN is_a_boolean = TRUE THEN 't' ELSE 'f' END 
>        col_c 
> FROM 
>        baz;
> 
> I avoid the problem.
> 

This is more surprising. I don't reproduce this on 1.12. Could you tell
us more about your working set? how many lines for example? can you send
me a self-contained examples with your time measurements? Thanks.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

In response to

pgadmin-support by date

Next:From: Guillaume LelargeDate: 2011-04-17 13:18:42
Subject: Re: Feature request: Allow Grant Wizard at lower level
Previous:From: Guillaume LelargeDate: 2011-04-17 12:55:56
Subject: Re: pgAdmin: blank header in the "Edit Data" window if table OID changes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group