Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

ComboBox issue

$
0
0
I have a combo box which I want to populate two text boxes based on the user input. Right now, it's only populating the one text box and the other is not populated at all. I have a table with three columns. Each are referenced in the after update event of the combo box as below. ...

SQL Query ORDER BY string time

$
0
0
Hey all I have the following table that I am needing to order by depending on the time it starts. Example data: Code: --------- 4:30pm-10:00pm 5:00am-4:00pm 10:30am-4:00pm 2:00pm-10:45pm

Multi user access design for a large database - interesting challenge

$
0
0
Hello, I'd really appreciate some thoughts.... I have a complex dataset/dbase containing possibly hundreds of integer fields stored. This data is financial based. It's viewed and manipulated via a GUI delivered via a SaaS web app. I have two types of users; 1) ones who can consume the...

Point In Time Recovery tablespace

$
0
0
Hi all, I am new to postgres. I am looking for a method to do a point in time restore/recovery of a single tablespace in Postgres. Say for example I have multiple databases in one Postgres instance and someone accidently dropped some objects in one of the databases. Is there a way to recover...

Navigation Form : How To return on calling Page Record

$
0
0
Hi, I have a navigation form with 2 tabs (pages). 1. tab1 = purchase order 2. tab2 : purchase order detail

Very new to databases need help with an idea

$
0
0
Hello, I am more of a data analyst but am working my way into databases. I have been working on an idea for the new company I am working for and would like some advice on if I am on the right path. We have a few smaller businesses that we are managing but they all run different CRM and POS...

Long Text Only Giving 255 characters

$
0
0
Hello, I have a long text box on my form. It's populated when a choice from a combo box is selected. Unfortunately, it's only returning 255 characters and tunicates the rest. I have it set to rich text, and can grow. Am I missing something? The table is also set to long text. I have...

Jobs with a good IT firm

$
0
0
ID Advertised Title City State Security Clearance Clearance Status Schedule 115953 WEB DEVELOPER 3 Denver Colorado TS/SCI with Polygraph Must be Current Full Time 116502 INTELLIGENCE ANALYST SIGINT 2 Aurora Colorado TS/SCI Must be Current Full Time 116416 Site Representative Colorado...

Grant view Database to Group

$
0
0
I have a server with multiple databases attached that I would like to have a certain group being able to view their respective databases only, such as [DOMAIN\Group1] being able to only see Database1, [DOMAIN\Group2] being able to only see Database2, etc. For the purposes of this example, I...

Why PostgreSQL scans a lot of rows?

$
0
0
I have posted question to stackoverflow
http://dba.stackexchange.com/questio...-a-lot-of-rows

I have not a big table with only 135000 rows inside.

Here is schema

Code:

id        integer        NOT NULL        nextval('history_sum_id_seq'::regclass)
    zone_id        integer        NOT NULL       
    spot_id        character varying(24)                NULL::character varying
    customer_id        integer               
    broker_id        integer               
    date        date        NOT NULL       
    created_date        timestamp(0) without time zone        NOT NULL       
    statistics_hits        integer                0
    statistics_real_hits        integer                0
    statistics_paid_hits        integer                0
    statistics_clicks        integer                0
    earnings_eur        double precision                '0'::double precision
    earnings_usd        double precision                '0'::double precision
    earnings_rub        double precision                '0'::double precision
    broker_name        character varying(100)                NULL::character varying
    customer_email        character varying(128)                NULL::character varying
    customer_commission        integer

This is my SQL

Code:

SELECT
        "hs"."customer_id",
        "hs"."customer_email" AS "account",
        CASE WHEN max("monthlyAvg"."monthlyAvgValue") is not null THEN
            max("monthlyAvg"."monthlyAvgValue") ELSE 0::int END AS "monthlyAvg",
        CASE WHEN max("weeklyAvg"."weeklyAvgValue") is not null THEN
            max("weeklyAvg"."weeklyAvgValue") ELSE 0::int END AS "weeklyAvg"
    FROM
        "history_sum" AS "hs"
            LEFT JOIN (
                SELECT
                    "hs"."customer_id" AS "customer_id",
                    round((SUM("hs"."statistics_real_hits")::numeric / 30::numeric), 2) AS "monthlyAvgValue"
                FROM
                    "history_sum" AS "hs"
                WHERE
                    "hs"."date" BETWEEN '2016-04-29' AND '2016-05-29'
                GROUP BY
                    "hs"."customer_id",
                    "hs"."date"
                ORDER BY
                    "hs"."date" DESC
            ) AS "monthlyAvg" ON "monthlyAvg"."customer_id" = "hs"."customer_id"
            LEFT JOIN (
                SELECT
                    "hs"."customer_id" AS "customer_id",
                    round((SUM("hs"."statistics_real_hits")::numeric / 7::numeric), 2) AS "weeklyAvgValue"
                FROM
                    "history_sum" AS "hs"
                WHERE
                    "hs"."date" BETWEEN '2016-05-22' AND '2016-05-29'
                GROUP BY
                    "hs"."customer_id",
                    "hs"."date"
                ORDER BY
                    "hs"."date" DESC
            ) AS "weeklyAvg" ON "weeklyAvg"."customer_id" = "hs"."customer_id"
    WHERE
        "hs"."customer_email" is not null
    GROUP BY
        "hs"."customer_id",
        "hs"."customer_email",
        "hs"."customer_commission"
    ORDER BY
        account ASC
    LIMIT 50

And this is QUERY PLAN which I couldn't understand

Code:

QUERY PLAN
    Limit  (cost=35325.56..35325.68 rows=50 width=92) (actual time=6548.611..6548.615 rows=47 loops=1)
      ->  Sort  (cost=35325.56..35341.42 rows=6347 width=92) (actual time=6548.609..6548.610 rows=47 loops=1)
            Sort Key: hs.customer_email
            Sort Method: quicksort  Memory: 28kB
            ->  HashAggregate  (cost=35051.24..35114.71 rows=6347 width=92) (actual time=6548.525..6548.546 rows=47 loops=1)
                  Group Key: hs.customer_email, hs.customer_id, hs.customer_commission
                  ->  Hash Left Join  (cost=7636.01..28512.35 rows=373651 width=92) (actual time=3.648..1710.014 rows=14053634 loops=1)
                        Hash Cond: (hs.customer_id = "monthlyAvg".customer_id)
                        ->  Hash Left Join  (cost=2833.16..10289.12 rows=135914 width=60) (actual time=1.035..104.126 rows=530354 loops=1)
                              Hash Cond: (hs.customer_id = "weeklyAvg".customer_id)
                              ->  Seq Scan on history_sum hs  (cost=0.00..5587.55 rows=135914 width=28) (actual time=0.003..35.919 rows=135925 loops=1)
                                    Filter: (customer_email IS NOT NULL)
                                    Rows Removed by Filter: 30
                              ->  Hash  (cost=2831.54..2831.54 rows=130 width=36) (actual time=1.024..1.024 rows=8 loops=1)
                                    Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                    ->  Subquery Scan on "weeklyAvg"  (cost=2829.91..2831.54 rows=130 width=36) (actual time=1.020..1.021 rows=9 loops=1)
                                          ->  Sort  (cost=2829.91..2830.24 rows=130 width=12) (actual time=1.019..1.019 rows=9 loops=1)
                                                Sort Key: hs_1.date DESC
                                                Sort Method: quicksort  Memory: 25kB
                                                ->  HashAggregate  (cost=2823.07..2825.35 rows=130 width=12) (actual time=0.995..0.999 rows=9 loops=1)
                                                      Group Key: hs_1.date, hs_1.customer_id
                                                      ->  Bitmap Heap Scan on history_sum hs_1  (cost=41.66..2813.38 rows=1292 width=12) (actual time=0.186..0.678 rows=1484 loops=1)
                                                            Recheck Cond: ((date >= '2016-05-22'::date) AND (date <= '2016-05-29'::date))
                                                            Heap Blocks: exact=119
                                                            ->  Bitmap Index Scan on sum_date_customer_email  (cost=0.00..41.34 rows=1292 width=0) (actual time=0.169..0.169 rows=1484 loops=1)
                                                                  Index Cond: ((date >= '2016-05-22'::date) AND (date <= '2016-05-29'::date))
                        ->  Hash  (cost=4795.97..4795.97 rows=550 width=36) (actual time=2.603..2.603 rows=36 loops=1)
                              Buckets: 1024  Batches: 1  Memory Usage: 10kB
                              ->  Subquery Scan on "monthlyAvg"  (cost=4789.10..4795.97 rows=550 width=36) (actual time=2.582..2.599 rows=39 loops=1)
                                    ->  Sort  (cost=4789.10..4790.47 rows=550 width=12) (actual time=2.582..2.583 rows=39 loops=1)
                                          Sort Key: hs_2.date DESC
                                          Sort Method: quicksort  Memory: 26kB
                                          ->  HashAggregate  (cost=4754.44..4764.06 rows=550 width=12) (actual time=2.552..2.569 rows=39 loops=1)
                                                Group Key: hs_2.date, hs_2.customer_id
                                                ->  Bitmap Heap Scan on history_sum hs_2  (cost=176.71..4713.25 rows=5492 width=12) (actual time=0.404..1.467 rows=5783 loops=1)
                                                      Recheck Cond: ((date >= '2016-04-29'::date) AND (date <= '2016-05-29'::date))
                                                      Heap Blocks: exact=215
                                                      ->  Bitmap Index Scan on sum_date_customer_email  (cost=0.00..175.34 rows=5492 width=0) (actual time=0.378..0.378 rows=5783 loops=1)
                                                            Index Cond: ((date >= '2016-04-29'::date) AND (date <= '2016-05-29'::date))
    Planning time: 0.643 ms
    Execution time: 6548.802 ms
    41 row(s)
   
    Total runtime: 6,551.098 ms

As you can see at some point Postgres increases number of rows to crazy `rows=530354` and I don't know why it's happen.

Subqueries, if I run them separately, are very fast, but when I'm join them to one query - this rows explode happens.

I need to add another 3 simple subqueries here and after that number of rows for scan will expand to `Sort (cost=4793.22..4794.60 rows=550 width=24) (actual time=2.881..127147.085 rows=3353783690 loops=1)`
and I will get

`Planning time: 1.490 ms
Execution time: 1593005.255 ms`

Why it happens? What I'm doing wrong ?

Postgres version is 9.5.

Exclusive Offer - Avail up to 20% OFF VPS Hosting

$
0
0
Webhosting UK Com Ltd. (WHUK), a renowned web hosting company in the UK since 2001, offers professional grade Linux/Windows VPS hosting service over Dell hardware hosted in Tier IV datacenter facility in the UK.

With our latest promo on VPS Hosting, our entire range of plans have evolved into more affordable and value for money proposition! Here’s what you can avail through the latest promotion:

Use Discount Coupon – “SAVE15VPS” to avail 15% OFF Semi-Annual Price
Use Discount Coupon – “SAVE20VPS” to avail 20% OFF Annual Price

This is a limited time period offer and ends on Wednesday 8th June 2016, 11.59pm BST.

Quote:

Initiate a live chat with one of our friendly sales advisor to avail exclusive benefits on these servers besides the discounts!
Here is the list of Linux VPS plans:

VPS Basic @ £12.99 GBP Ex. VAT
1 vCPU Core
30 GB SSD Storage / 45 GB HDD Storage
FREE Plesk 12 Web Admin
1 GB RAM
Full Root SSH Access
Unlimited Bandwidth
Choice of Linux distributions
Free 24x7 Premium Support, Managed VPS
99.95% Uptime SLA
Monthly Price: £12.99 GBP Ex. VAT | Order Now

VPS Starter @ £19.99 GBP Ex. VAT
2 vCPU Cores
60 GB SSD Storage / 90 GB HDD Storage
FREE Plesk 12 Web Admin
2 GB RAM
Full Root SSH Access
Unlimited Bandwidth
Choice of Linux distributions
Free 24x7 Premium Support, Managed VPS
99.95% Uptime Guarantee
Monthly Price: £19.99 GBP Ex. VAT | Order Now

VPS Business @ £26.99 GBP Ex. VAT
3 vCPU Cores
80 GB SSD Storage / 120 GB HDD Storage
FREE Plesk 12 Web Pro
4 GB RAM
Full Root SSH Access
Unlimited Bandwidth
Choice of Linux distributions
Free 24x7 Premium Support, Managed VPS
99.95% Uptime SLA
Monthly Price: £26.99 GBP Ex. VAT | Order Now

VPS Enterprise @ £33.99 GBP Ex. VAT
4 vCPU Cores
120 GB SSD Storage / 180 GB HDD Storage
FREE Plesk 12 Web Pro
6 GB RAM
Full Root SSH Access
Unlimited Bandwidth
Choice of Linux distributions
Free 24x7 Premium Support, Managed VPS
99.95% Uptime SLA
Monthly Price: £33.99 GBP Ex. VAT | Order Now

For full list of Linux VPS Hosting features, visit: https://www.webhosting.uk.com/vps-hosting.php

Here is the list of Windows VPS plans:

Win. VPS Basic @ £15.99.00 GBP Ex. VAT
2 vCPU Cores
2GB RAM
45GB HDD Storage
Unlimited Bandwidth
Windows 2012 Standard R2
FREE Plesk 12 Web Admin
RDP Access
24x7 Support
99.95% Uptime
Fully Managed VPS
Free Setup
Monthly Price: £15.99 GBP Ex. VAT | Order Now

Win. VPS Starter @ £22.99.00 GBP Ex. VAT
2 vCPU Cores
3GB RAM
90GB HDD Storage
Unlimited Bandwidth
Windows 2012 Standard R2
FREE Plesk 12 Web Admin
RDP Access
24x7 Support
99.95% Uptime
Fully Managed VPS
Free Setup
Monthly Price: £22.99 GBP Ex. VAT | Order Now

Win. VPS Business @ £29.99 GBP Ex. VAT
3 vCPU Cores
4GB RAM
120GB HDD Storage
Unlimited Bandwidth
Windows 2012 Standard R2
FREE Plesk 12 Web Pro
RDP Access
24x7 Support
99.95% Uptime
Fully Managed VPS
Free Setup
Monthly Price: £29.99 GBP Ex. VAT | Order Now

Win. VPS Enterprise @ £36.99 GBP Ex. VAT
4 vCPU Cores
6GB RAM
180GB HDD Storage
Unlimited Bandwidth
Windows 2012 Standard R2
FREE Plesk 12 Web Pro
RDP Access
24x7 Support
99.95% Uptime
Fully Managed VPS
Free Setup
Monthly Price: £36.99 GBP Ex. VAT | Order Now


For full list of Windows VPS Hosting features, visit: https://www.webhosting.uk.com/windows-vps-hosting.php

What benefits can a VPS server offer you?


Control Panel Options:
WHM cPanel - £5.00 GBP per month
Plesk 12 Web Pro Edition - £7.00 GBP per month
Plesk 12 Web Host Edition - £9.00 GBP per month

Plesk Addons:
Plesk Power Pack - £3.00 GBP per month
Plesk Anti-Virus by Dr. Web - £4.00 GBP per month

R1Soft CDP Backup Space Plans:
10 GB - £3.00 GBP per month
25 GB - £5.00 GBP per month
50 GB - £10.00 GBP per month
100 GB - £15.00 GBP per month

In case you have any questions, you can contact our sales department by initiating a chat or by dropping an email to sales @ webhosting.uk.com or call us on 0800 862 0890 / +44-191-303-8069.

syntax error for simple IF - THEN

$
0
0
Hi,

I am trying to creat a simple IF - THEN in MySQL but getting a synax error message.

can anyone help please...

here is my statement:

IF EXISTS (SELECT payroll_id FROM payroll WHERE location_id = param_location AND payroll_month = param_month AND payroll_year = param_year) THEN
SET param_payroll_id = 0;
END IF;


Thanks,
Jassim

BCP To CSV

$
0
0
I have the basic syntax for BCP to a CSV file down. I have 2 ?'s regarding this procedure.
1) is it possible to copy header text (meaning field names?
2) is it possible to delete the file once it has been attached to an email?

SYBASE 15.7 where the nindex stores?

$
0
0
My question is:
1. Where the table's index stores, within the data in the table or in separate table, segment ?
2. Does the index updated when we insert, update, delete data. I don't ask about update index statistics, I ask about update index by the system


Thanks,
Oleg

What is the use of ENUMs in MySQL?

$
0
0
Hello Everyone,

Please tell me the usage of ENUMS in MYSQL?
How it work and benefits of ENUMS?

Install Mysql 5.7 Enterprise Edition with license Key

$
0
0
Dear All,

Our company bought Mysql 5.7 Enterprise Edition for 3 years. Now we need to install it in RedHat Linux 7 (also licensed) server. But I am not sure how to do it. I have installed community version but never installed licensed version.

I need help!!

Thanks..

Problem in connecting to database

$
0
0
Hello experts,

We have a issue in connecting to DB2 database after it was brought down for firmware upgrade.

1. The error is ---The database must be upgraded to latest release.However we are at DB2 level 10.5.6
We can see this error in db2diag.log from long time.

2. This system is brought down after long time.Now we are not able to connect to DB.

If we issue db2 connect to database <SID>,its throwing the above error.

We even tried FIX pack upgrade,the post installation script is also giving then same error.

Kindly help us to resolve the issue.

Thanks,

Karthik

Master & Detail Form data comparison (detail form input validation)

$
0
0
HI All,

I have created a Master/detail form for user input data, there is a quantity field in both master and detail form.
I have to ensure the sum of the quantity field in the detail form is not allow to large than the master quantity field.

For example, A record in the master form have quantity 5.

When user insert a new record in A detail record and the quantity is 1, then it's ok because its less than 5.
When user insert another new record in A detail record and the quantity is 5, then it's not allow because the sum of the detail record is large than 5.

I have already create a sum of quantity in the master form to get the sum in detail form.
when i try to use follow rule, the system prompt that its invalid.

[InventoryDetails].[Form]![sumquantity]<=[Inventory].[Form]![quantity]

Thank very much if anyone can give me some hints!

Position for Java Architect in Bethesda MD

$
0
0
Only W2

Send Resume to: garrydawkins@hotmail.com

Position: Java Architect

Location: Bethesda MD

Duration: Full Time



Years of Experience: 5-8 years being part of technical team responsible for architecture, design and development of major IT systems.

Hands-on experience in widely used J2EE web application frameworks like Struts, Java Server Faces, etc.

Hands-on experience developing both SOAP as well as REST web services

Experience with systems development utilizing complex SQL, stored procedures, etc. with Oracle database

Substantial experience with tool sets (e.g. Java, Eclipse/JDeveloper, DROOLS, etc.)

Experience in deployment of enterprise applications in widely used containers such as OC4J, Web logic, etc.

Experience with JIRA, Bamboo, etc.

Experience in troubleshooting production issues in a multi-tiered environment

Required Education: Bachelors; Desired Education: Masters

Oracle Data Management consultant‏

$
0
0
Role : Oracle Data Management consultant with enterprise architecture and data architecture concepts
Location : West Chester, PA
Duration : Long term
Experience : 10+ Years
Roles and responsibility :
Hands on experience with technical design, coding and delivering enterprise class data management systems in the Oracle environment (must be Oracle PL-SQL expert).
* Design, development and implementation of complex data management and reporting solutions, with integrated UI and workflow components.
* Demonstrated experience with design and construction of data interfaces from transactional legacy systems into a dimensional data model.
* Promote design of re-usable components and services
* Ensure software projects are completed according to project requirements and are properly documented with traceability through project specifications including functional and technical documents.
* Provide Level 2 production support on a rotating basis.
* Provide IT representation with internal customers and USFS IT areas.
* Participate in architecture and design sessions with team members and peers.
* Interact and work directly with customer team members on projects and support issues.
* Build relationships with business customers and peers across the IT organization.
* Facilitate communication upward and across project teams including project status.
* Follow change management and problem management processes.
* Assist in the definition and implementation of architectural improvement measures within the
environment.
* Propose and institute software development process improvements.

Mandatory Technical / Functional Skills :
Bachelor’s degree in Computer Science preferred
10+ years’ experience in the area of data management, modeling, data analysis, and/or reporting
Strong technical documentation and technical writing skills
Prior experience with financial services, retirement, insurance, or medical records industry highly desirable
Expertise with Star, Snowflake, and 3NF data modeling techniques as well as data warehousing & data mart principles and methodologies
Hands on expertise with data modeling tools such as ERwin or Embarcadero ER Studio
Hands on experience working with relational databases such as Oracle, SQL Server, DB2, Sybase
Hands on experience working with ETL tools such as Informatica or SSIS
Familiarity with master data management tools and concepts
Familiarity with industry standard models like ACORD or IIA
Hands on experience with designing and modeling ODS/Warehouses
Expertise on dimensional modeling and slowing changing dimensions
Familiarity with BI tools like Business Objects, OBIEE, etc.
Knowledge of Big Data technologies a plus
Ability to collaborate in a multi-site matrixed work environment
Proficient with enterprise architecture and data architecture concepts
Eagerness to learn new tools and technologies
Experience working in an agile or continuous improvement environment
Eagerness to learn new tools and technologies



Kindly send us the following Mandatory details along with the updated resume for immediate Consideration:

Name:
Phone No:
Email:

Please send to garrydawkins@Hotmail.com

Today!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Viewing all 13329 articles
Browse latest View live