Board index » jbuilder » jdbTextField causing the application to slow down if the column is numeric?

jdbTextField causing the application to slow down if the column is numeric?


2004-07-22 03:55:18 PM
jbuilder9
I have a database that has two values that are numeric (postgre).
Whenever these fields contain data on a specific row the application
slows down ALOT. If i edit the row and set the numeric values to null
the application doesn't slow down at all.
Has anyone else noticed this? when the application is viewing data in
textFields that hold Numeric data it slows down alot.
I tested around some and found out that it indeed is the numeric fields
that make this happen.
--petteri
 
 

Re:jdbTextField causing the application to slow down if the column is numeric?

Petteri Torkko wrote:
Quote
I have a database that has two values that are numeric (postgre).

Whenever these fields contain data on a specific row the application
slows down ALOT. If i edit the row and set the numeric values to null
the application doesn't slow down at all.

Has anyone else noticed this? when the application is viewing data in
textFields that hold Numeric data it slows down alot.

I tested around some and found out that it indeed is the numeric fields
that make this happen.

--petteri
If you are querying specifically on these fields, makes perfect sense.
VarChars are always slower than numeric values.
To speed things up, include an index in or for your query on the varchar
defined fields, where you are storing numeric values.
 

Re:jdbTextField causing the application to slow down if the column is numeric?

Paul Nichols (TeamB) wrote:
Quote
>I tested around some and found out that it indeed is the numeric fields
>that make this happen.
>
>--petteri

If you are querying specifically on these fields, makes perfect sense.
VarChars are always slower than numeric values.

To speed things up, include an index in or for your query on the varchar
defined fields, where you are storing numeric values.

Hmm did you get me right there?
database table has two columns (+more) x and y. both x and y are defined
numerical.
When i query the database for data to show on textfields two things can
happen:
a) if x and y are empty (null) the program runs normally
b) if x and y hold data the program slows down ALOT
its not the query, its the jdbTextFields that seem to do it
takes 30+ seconds to even get focus on the textfield holding this
numerical data.
saving is slow, changing dataset row to a row that contains these columns
could have something to do with jdbtextfields recognizing numerical
database values and trying to format them, but dunno
-petteri
(and data in them) is slow,
 

{smallsort}

Re:jdbTextField causing the application to slow down if the column is numeric?

Its not the jdbTextFields, since i use it with numeric values and varchars.
did u tried to set the MetadataUpdate to none and define the primary key
column by yourself? that speeded up alot my application.
regards Martin
"Petteri Torkko" < XXXX@XXXXX.COM >wrote in message
Quote
Paul Nichols (TeamB) wrote:
>>I tested around some and found out that it indeed is the numeric fields
>>that make this happen.
>>
>>--petteri
>
>If you are querying specifically on these fields, makes perfect sense.
>VarChars are always slower than numeric values.
>
>To speed things up, include an index in or for your query on the varchar
>defined fields, where you are storing numeric values.
>

Hmm did you get me right there?

database table has two columns (+more) x and y. both x and y are defined
numerical.

When i query the database for data to show on textfields two things can
happen:

a) if x and y are empty (null) the program runs normally

b) if x and y hold data the program slows down ALOT

its not the query, its the jdbTextFields that seem to do it

takes 30+ seconds to even get focus on the textfield holding this
numerical data.

saving is slow, changing dataset row to a row that contains these columns

could have something to do with jdbtextfields recognizing numerical
database values and trying to format them, but dunno

-petteri
(and data in them) is slow,

 

Re:jdbTextField causing the application to slow down if the column is numeric?

On Fri, 23 Jul 2004 11:38:23 +0200, Martin Frey
< XXXX@XXXXX.COM >wrote:
Quote
Its not the jdbTextFields, since i use it with numeric values and
varchars.
did u tried to set the MetadataUpdate to none and define the primary key
column by yourself? that speeded up alot my application.

I work with Petteri on the same project, and as far as we can tell, it is
definetly related to the numeric fields. Our queries generally result in
very small DataSets and they work like a charm, unless one inserts a value
to the numeric fields, which totally makes the application unusable.
The problem is that when you encounter one JdbTextField in the application
that has a numeric DB datatype, switching to this or from this row to next
with DataSet.next() takes up to 1 minute, moving cursor to a field of this
type takes around 30seconds and so on.
Your solution did not help, by the way.
I have not yet used the de{*word*81} to see where the slowdown occurs as I've
been busy with other parts of the application.
We can simply use floats or thelike but that's not what we wanted...
Tools we're using:
JBuilderX Foundation
PostgreSQL 7.3
PostgreSQL JDBC drivers for 7.3
--
Antti Alestalo
Software Designer
Cardinal Information Systems
Using Opera's revolutionary e-mail client: www.opera.com/m2/
 

Re:jdbTextField causing the application to slow down if the column is numeric?

I don't know if PostgreSQL has it, but in MySQL, you can add
"&profileSql=true" to the database name to get debugging output on the java
console. MySQL also prints the query access times, which really helps
identify areas within the database which need optimization.
regards,
Dar7yl
"Antti Alestalo" <nospam@nohost>wrote in message
On Fri, 23 Jul 2004 11:38:23 +0200, Martin Frey
< XXXX@XXXXX.COM >wrote:
Quote
Its not the jdbTextFields, since i use it with numeric values and
varchars.
did u tried to set the MetadataUpdate to none and define the primary key
column by yourself? that speeded up alot my application.

I work with Petteri on the same project, and as far as we can tell, it is
definetly related to the numeric fields. Our queries generally result in
very small DataSets and they work like a charm, unless one inserts a value
to the numeric fields, which totally makes the application unusable.
The problem is that when you encounter one JdbTextField in the application
that has a numeric DB datatype, switching to this or from this row to next
with DataSet.next() takes up to 1 minute, moving cursor to a field of this
type takes around 30seconds and so on.
Your solution did not help, by the way.
I have not yet used the de{*word*81} to see where the slowdown occurs as I've
been busy with other parts of the application.
We can simply use floats or thelike but that's not what we wanted...
Tools we're using:
JBuilderX Foundation
PostgreSQL 7.3
PostgreSQL JDBC drivers for 7.3
--
Antti Alestalo
Software Designer
Cardinal Information Systems
Using Opera's revolutionary e-mail client: www.opera.com/m2/