jai une base de donnees sous Sybase , elle utilise des view comment les executes
Merci
jai une base de donnees sous Sybase , elle utilise des view comment les executes
Merci
Je ne comprends pas bien la question...
Une vue s'utilise comme une table, dans un SELECT (et, si la vue est simple elle peux s'utiliser aussi dans un update ou un delete).
Michael
Michael Peppler
Membre de TeamSybase - www.teamsybase.com
"A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson
Je pense qu'il faudrait déjà comprendre ce qu'est une vue.
Je vous renvoie à la lecture de la documentation:
http://infocenter.sybase.com/help/in...lug/X29678.htm
DBA sybase confirmé
Cherche un poste sur Paris
Oui, vous ne pouvez pas << execute >> une vue. Vous devez SELECT FROM une vue.
Bonjour
merci pour votre reponse
veuillez trrouver ci joint ma vue :
si je l execute :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 CREATE VIEW SIMSwap ( CCOperator, PhoneNo, SIMSwapDate, SIMNumber, OldSIMNumber, OrganizationID, OrganizationName) AS SELECT SIMSwapDetail.UserName, AccountMSISDN.SubordinateMPhoneNumber, SIMSwapDetail.SIMSwapDate, SIMSwapDetail.SIMNumber, SIMSwapDetail.OldSIMNumber, CustCareConfig.OrganizationID, CustCareConfig.OrganizationName FROM SIMSwapDetail inner join AccountMSISDN ON SIMSwapDetail.SubscriberID = AccountMSISDN.SubordinateSubscriberID and AccountMSISDN.Deleted is null inner join Account on AccountMSISDN.AccountID = Account.AccountID inner join CustCareConfig on Account.OrganizationID = CustCareConfig.OrganizationID
select * from SIMSwap
go
elle va mettre beacoup de temp pour afficher un resultat ( jai arreter l execution avant car c est trop long )
ya un autre moyen ?
Merci d avance
Il est impossible de donner un diagnostique avec l'information que nous possédons pour l'instant.
La requête mets longtemps.... mais quelle est la taille des tables sous-jacentes?
est-ce qu'il y a des indexes?
Un select * from ... avec trois tables peut évidemment prendre très longtemps si les tables sont grandes, ou si les indexes ou les critères de jointures sont incorrectes.
Michael
Michael Peppler
Membre de TeamSybase - www.teamsybase.com
"A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson
Oui, la syntaxe est correcte, et d'ailleurs votre vue ne se serait pas compilée si ce n'était pas le cas
Pour améliorer les performances, tentez déjà de déterminer si les colonnes apparaissant dans les clauses ON de vos jointures ANSI sont correctement indexées... un index manquant sur de grosses tables et 3 jointures peut avoir rapidement un impact péjorant sur les performances
Une vision du plan d'exécution pourrait vous/nous aider à trouver la faille (set showplan on avant le select de la vue)
Sr DBA Oracle / MS-SQL / MySQL / Postgresql / SAP-Sybase / Informix / DB2
N'oublie pas de consulter mes articles, mon blog, les cours et les FAQ SGBD
Attention : pas de réponse technique par MP : pensez aux autres, passez par les forums !
Bonjour
voici ce que j ai fais :
le resultat :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 set showplan select PhoneNo from SIMSwap go
>[Error] Script lines: 1-3 --------------------------
Incorrect syntax near the keyword 'select'.
Msg: 156, Level: 15, State: 2
Server: PPLE_SYB, Line: 2
[Executed: 11/18/08 12:53:54 PM GMT+01:00 ] [Execution: 0/ms]
Petite erreur de syntaxe:
Michael
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 set showplan on
Michael Peppler
Membre de TeamSybase - www.teamsybase.com
"A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson
Bonjour
Effectivement :
le resultat est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 SET showplan ON go select * from SIMSwap go
j attend vos commentaires et merci pour votre aides
VERY LOW ON MEMORY, Resultset too large. Increase memory limit for Aqua Data Studio and restart the application. As a
Java application, Aqua Data Studio is limited to the memory allocated to the JVM at startup. You may change your
setting according to the Operating System you are working on.
Windows
-------------
I. Windows EXE execution
In your installation directory (default: "C:\Program Files\Aqua Data Studio") there is a file called
datastudio.cfg which contains JVM parameters for startup. In this file you may modify the 3rd line which starts
with "-Xmx256M ...", where '256' is equal to the amount of memory allocated to Aqua Data Studio.
You can change this number to increase your memory to 512MB, 1024MB or larger. Once you have made your changes,
restart Aqua Data Studio.
II. Windows .bat execution
In your installation directory there are two files called datastudio-bundled.bat and datastudio.bat which are
used to start Aqua Data Studio. In either of these files modify the last line which starts with "java -cp ..."
or ".\jre\bin\java -Xmx256M ...", where '256' is equal to the amount of memory allocated to Aqua Data Studio.
You can change this number to increase your memory to 512MB, 1024MB or larger. Or add the option if it doesn't
exist. Once you have made your changes, restart Aqua Data Studio.
Linux
-------------
I. Linux Application
In your installation directory there are two files called datastudio-bundled.sh and datastudio.sh which are
used to start Aqua Data Studio. In either of these files modify the last line which starts with "java -cp ..."
or ".\jre\bin\java -Xmx256M ...", where '256' is equal to the amount of memory allocated to Aqua Data Studio.
You can change this number to increase your memory to 512MB, 1024MB or larger. Or add the option if it doesn't
exist. Once you have made your changes, restart Aqua Data Studio.
OSX
-------------
I. OSX Double Clickable Application
The OSX double-clickable application is actually a directory structure with an extension of ".app". You may modify
the files in this directory structure by right-clicking on the Aqua Data Studio icon and selecting "Show Package Contents"
where you can browse to edit Contents/Info.plist with TextEdit. This file is an XML file containing startup parameters for
Aqua Data Studio. To change or increase the memory add the following XML tags in the <dict> </dict> tags right before the
<key>MainClass</key> where '256' is the amount of memory you want for Aqua Data Studio. Example ...
...
<dict>
<key>VMOptions</key>
<string>-Xmx256m</string>
<key>MainClass</key>
<string>com.aquafold.datastudio.DataStudio</string>
<key>JVMVersion</key>
<string>1.4+</string>
...
II. OSX Unix Application
In your installation directory there is a file called datastudio.sh which is used to start Aqua Data Studio.
In this file modify the last line which starts with "java -cp ...", where '256' is equal to the amount of
memory allocated to Aqua Data Studio. You can change this number to increase your memory to 512MB, 1024MB or
larger. Or add the option if it doesn't exist. Once you have made your changes, restart Aqua Data Studio.
Cordialement
Il me semble qu'il y a une option de config dans Aqua Data Studio qui limite le nombre de lignes retournées par une requête. Il faut positionner ce paramètre à qqch de raisonable (p.ex. 1000 lignes).
Ou alors suivre la recommendation dans le message d'erreur, et mettre à jour le paramètre -Xmx et le monter à 512 (p.ex.) du .bat ou .sh qui lance l'appli.
Michael
Michael Peppler
Membre de TeamSybase - www.teamsybase.com
"A successful [software] tool is one that was used to do something undreamed of by its author." -- S. C. Johnson
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager