Subject RE: [firebird-support] Firebird migration to increase perfomances
Author Stef
Hi Set



Below is the actual data from the journal table as per the example I
mentioned in my previous email



Both the customer and cashcustomer tables only have 1 record each




JOURID

JDATE

JTYPE

MODULE

TRXDATE

SOURCEID

SOURCE

DEBITAMOUNT

DESCRIPTION

STAFFID

STATUS

ACCNR

ACCCLASS

LEDGERTYPE

CREDITAMOUNT

DEPARTMENT

COMPANY

SOURCE2

CID

VSID

SUPPID

DDATE

SOURCENAME

FPERIOD

RECONCILED

BATCH

HASVAT

SERVICEADVISOR

TRANSNR

CLOSED


646358

05.06.2015

1

1

05.06.2015

51424

40451

0.00

PART SALES

16

NEW

1501200

1

Cr

18 500.00

50

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



646359

05.06.2015

1

1

05.06.2015

51424

40451

2 556.25

COS PARTS

16

NEW

6506200

6

Cr

0.00

50

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



646360

05.06.2015

1

1

05.06.2015

51424

40451

0.00

PART SALES

16

NEW

1501200

1

Cr

0.00

50

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



646361

05.06.2015

1

1

05.06.2015

51424

40451

0.00

PARTS

16

NEW

3993200

3

Cr

2 556.25

99

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



646362

05.06.2015

1

1

05.06.2015

51424

40451

21 090.00

ACCOUNTS RECEIVABLE

16

NEW

3993100

3

Cr

0.00

99

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



646363

05.06.2015

1

1

05.06.2015

51424

40451

0.00

VAT ON SALES

16

NEW

5995300

5

Cr

2 590.00

99

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

16

63619



647446

09.06.2015

4

1

08.06.2015

51424

40451

21 090.00

BANK ACOUNTS

16

NEW

3993002

3

Dr

0.00

99

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

35273

16

63836



647447

09.06.2015

4

1

08.06.2015

51424

40451

0.00

ACCOUNTS RECEIVABLE

16

NEW

3993100

3

Dr

21 090.00

99

51424

0

0

05.06.2015

51424 CASH SALE SHARON

2015-6

35273

16

63836







Hope this helps



Stef





From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Sent: 23 June 2015 01:16 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Firebird migration to increase perfomances





>Hi Set
>
>Wow your query runs like a bat out of hell J 0.16 Milliseconds !! and it
>easier to maintain as you say.
>
>The only issue is that it somehow multiplies the totals by 6 on all results
>as compared mine?
>
>i.e. mine will return an invoice total of say 18500.00 and yours will
return
>111000.00
>
>This is across all the results any idea why?

Would you get six times as many rows in your result set with your original
query if you didn't have the DISTINCT, Stef? Or are any of the JOINs
returning more than one row - e.g. are there six invoices for each entry in
journal? This should be fairly simple to fix, but more information about the
tables and how unique each JOIN are would be required.

Set





[Non-text portions of this message have been removed]